目录

ambWith

ambWith图解

ambWith测试用例

ambWith分析

ambWith实用场景

镜像


ambWith

Flowable<T>

ambWith(Publisher<? extends T> other)

镜像首先发射项目或终止通知的Publisher

ambWith图解

RxJava2 Flowable ambWith

ambWith测试用例

测试代码
 private void ambWith() {

        Flowable flowable = Flowable.just("instance");
        System.out.println("原始Publisher的hashCode" +flowable.hashCode());
        Flowable mirroring = flowable.ambWith(flowable);
        System.out.println("镜像Publisher的hashCode" +mirroring.hashCode());
    }

测试结果:
10-03 00:17:21.688 2747-2747/hq.demo.net I/System.out: 原始Publisher的hashCode59760856
10-03 00:17:21.688 2747-2747/hq.demo.net I/System.out: 镜像Publisher的hashCode164936753

ambWith分析

ambWith其实就是根据给定Publisher做出一个镜像

 

ambWith实用场景

(后续完善)

 

镜像

镜像(Mirroring)是冗余的一种类型,一个磁盘上的数据在另一个磁盘上存在一个完全相同的副本即为镜像。

镜像是一种文件存储形式,可以把许多文件做成一个镜像文件,与GHOST等程序放在一个盘里用GHOST等软件打开后,又恢复成许多文件,RAID 1和RAID 10使用的就是镜像。常见的镜像文件格式有ISO、BIN、IMG、TAO、DAO、CIF、FCD。

 

相关文章:

  • 2022-01-16
  • 2021-12-16
  • 2021-11-28
  • 2021-08-27
  • 2021-04-07
  • 2021-09-07
  • 2021-12-03
  • 2021-06-15
猜你喜欢
  • 2021-12-30
  • 2021-12-02
  • 2021-10-18
  • 2021-05-28
  • 2022-12-23
  • 2021-06-26
  • 2021-08-17
相关资源
相似解决方案