38
38
* lifecycle and handle being killed or restarted by the operating system
39
39
*/
40
40
public abstract class ReplicationService extends Service
41
- implements ReplicationPolicyManager . ReplicationsCompletedListener {
41
+ implements PolicyReplicationsCompletedListener {
42
42
43
43
public static final String EXTRA_INTENT = "intent" ;
44
44
@@ -78,13 +78,13 @@ public abstract class ReplicationService extends Service
78
78
private List <Message > mCommandQueue = new ArrayList <Message >();
79
79
80
80
/**
81
- * Stores the set of {@link ReplicationPolicyManager.ReplicationsCompletedListener }s
81
+ * Stores the set of {@link PolicyReplicationsCompletedListener }s
82
82
* listening for replication complete
83
83
* events. Note that all modifications or iterations over mListeners should be protected by
84
84
* synchronization on the mListeners object.
85
85
*/
86
- private final Set <ReplicationPolicyManager . ReplicationsCompletedListener > mListeners = new
87
- HashSet <ReplicationPolicyManager . ReplicationsCompletedListener >();
86
+ private final Set <PolicyReplicationsCompletedListener > mListeners = new
87
+ HashSet <PolicyReplicationsCompletedListener >();
88
88
89
89
// It's safest to assume we could be transferring a large amount of data in a
90
90
// replication, so we want a high performance WiFi connection even though it
@@ -303,7 +303,7 @@ protected void stopReplications() {
303
303
@ Override
304
304
public void allReplicationsCompleted () {
305
305
synchronized (mListeners ) {
306
- for (ReplicationPolicyManager . ReplicationsCompletedListener listener : mListeners ) {
306
+ for (PolicyReplicationsCompletedListener listener : mListeners ) {
307
307
listener .allReplicationsCompleted ();
308
308
}
309
309
}
@@ -314,7 +314,7 @@ public void allReplicationsCompleted() {
314
314
@ Override
315
315
public void replicationCompleted (int id ) {
316
316
synchronized (mListeners ) {
317
- for (ReplicationPolicyManager . ReplicationsCompletedListener listener : mListeners ) {
317
+ for (PolicyReplicationsCompletedListener listener : mListeners ) {
318
318
listener .replicationCompleted (id );
319
319
}
320
320
}
@@ -323,33 +323,33 @@ public void replicationCompleted(int id) {
323
323
@ Override
324
324
public void replicationErrored (int id ) {
325
325
synchronized (mListeners ) {
326
- for (ReplicationPolicyManager . ReplicationsCompletedListener listener : mListeners ) {
326
+ for (PolicyReplicationsCompletedListener listener : mListeners ) {
327
327
listener .replicationErrored (id );
328
328
}
329
329
}
330
330
}
331
331
332
332
/**
333
333
* Add a listener to the set of
334
- * {@link com.cloudant.sync.replication.ReplicationPolicyManager.ReplicationsCompletedListener }s that are notified when
334
+ * {@link PolicyReplicationsCompletedListener }s that are notified when
335
335
* replications complete.
336
336
*
337
337
* @param listener The listener to add.
338
338
*/
339
- public void addListener (ReplicationPolicyManager . ReplicationsCompletedListener listener ) {
339
+ public void addListener (PolicyReplicationsCompletedListener listener ) {
340
340
synchronized (mListeners ) {
341
341
mListeners .add (listener );
342
342
}
343
343
}
344
344
345
345
/**
346
346
* Remove a listener from the set of
347
- * {@link com.cloudant.sync.replication.ReplicationPolicyManager.ReplicationsCompletedListener }s that are notified when
347
+ * {@link PolicyReplicationsCompletedListener }s that are notified when
348
348
* replications complete.
349
349
*
350
350
* @param listener The listener to remove.
351
351
*/
352
- public void removeListener (ReplicationPolicyManager . ReplicationsCompletedListener listener ) {
352
+ public void removeListener (PolicyReplicationsCompletedListener listener ) {
353
353
synchronized (mListeners ) {
354
354
mListeners .remove (listener );
355
355
}
0 commit comments