| 128 | } |
| 129 | |
| 130 | func (ar *ActiveReplicator) Reset() error { |
| 131 | var pushErr error |
| 132 | if ar.Push != nil { |
| 133 | pushErr = ar.Push.reset() |
| 134 | } |
| 135 | |
| 136 | var pullErr error |
| 137 | if ar.Pull != nil { |
| 138 | pullErr = ar.Pull.reset() |
| 139 | } |
| 140 | |
| 141 | if pushErr != nil { |
| 142 | return pushErr |
| 143 | } |
| 144 | |
| 145 | if pullErr != nil { |
| 146 | return pullErr |
| 147 | } |
| 148 | |
| 149 | if ar.config.ReplicationStatsMap != nil { |
| 150 | ar.config.ReplicationStatsMap.Reset() |
| 151 | } |
| 152 | |
| 153 | return nil |
| 154 | } |
| 155 | |
| 156 | // _onReplicationComplete is invoked from Complete in an active replication. If all replications |
| 157 | // associated with the ActiveReplicator are complete, onComplete is invoked |