How to change channel of Pull Replication?

connections
java

#1

i am working with multiple channels . I need to change channel some times. But problem is that, i have to stop pull then set pull url and new channel & then start pull replication for get data using new channel .

Is there any option for create multiple replication object from same syncURL?


#2

No, you need to stop the replication before changing channels.


#3

Has any way to create multiple Replication object from same Database ?


#4

Sure, just call the factory method again.


#5

I have added channels for pull . But no documents found . I have called pullReplication with changeLintener . But didn’t get old documents . Only got which has changed . How i will get old documents which i didn’t emmit into Map first time ?


#6

Have you pulled with that set of channels before? If you did, then the replication will pull the documents in those channels that have changed since the last time.

In other words, a plain replicator (no channels specified) has a separate state from a replicator with one set of channels, which has a separate state from a replicator with another set of channels.

If you call reset on a Replicator instance, it will clear its state and fetch everything. (But this will be slower.)


#7

Can you please tell me how i reset Replication instance ? Do i set Replication instance null and then create again or else ?


#8

Sorry, I just realized the reset functionality isn’t in the public API. But you shouldn’t need it.


#9

HI, i want to delete document from local db of couchbase lite . How i will do this ? I don’t want to sync this deleted doc with server .


#10

Use the purge method.