Named replications using Ektorp under /_replicate

95 Views Asked by At

I am creating replications using ektorp's ReplicationCommand.Builder() like below :

ReplicationCommand replicationCommand = new ReplicationCommand.Builder()
            .source(sourceDB)
            .target(targetDB)
            .continuous(isContinuous)
            .build();
couchDbInstance.replicate(replicationCommand); 

This doesn't create a doc under _replicator db.

In my app I end up creating multiple replications and I might setup multiple replications with same source-target combination. When I have to cancel (one of the multiple replications), I end up cancelling all replications with that source-target combination.

ReplicationCommand replicationCommand = new ReplicationCommand.Builder()
            .source(sourceDB)
            .target(targetDB)
            .continuous(isContinuous)
            .cancel(isContinuous)
            .build();
couchDbInstance.replicate(replicationCommand);

I would like to have named-replications (like in _replicator when done through futon) so that I can cancel repeated one.

How do I do it ?

Regards, Vijay

0

There are 0 best solutions below