MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / setState

Method setState

db/active_replicator_common.go:430–437  ·  view source on GitHub ↗

setState updates replicator state and resets lastError to nil. Expects callers to be holding activeReplicatorCommon.lock

(state string)

Source from the content-addressed store, hash-verified

428// setState updates replicator state and resets lastError to nil. Expects callers
429// to be holding activeReplicatorCommon.lock
430func (arc *activeReplicatorCommon) setState(state string) {
431 arc.stateErrorLock.Lock()
432 arc.state = state
433 if state == ReplicationStateRunning {
434 arc.lastError = nil
435 }
436 arc.stateErrorLock.Unlock()
437}
438
439func (arc *activeReplicatorCommon) getState() string {
440 arc.stateErrorLock.RLock()

Callers 7

StartMethod · 0.95
reconnectMethod · 0.95
stopAndDisconnectMethod · 0.95
_connectMethod · 0.80
CompleteMethod · 0.80
_connectMethod · 0.80
CompleteMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected