public class SlaveStatementLocks extends Object implements org.neo4j.kernel.impl.locking.StatementLocks
In order to prevent various indexes collisions on master during transaction commit that originate on one of the
slaves we need to grab same locks on ResourceTypes.LABEL and ResourceTypes.RELATIONSHIP_TYPE that
where obtained on origin. To be able to do that and also prevent shared locks to be propagates to master in cases of
read only transactions we will postpone obtaining them till we know that we participating in a
transaction that performs modifications. That's why we will obtain them only as
part of prepareForCommit(LockTracer) call.
| Modifier and Type | Method and Description |
|---|---|
long |
activeLockCount() |
Stream<? extends org.neo4j.kernel.impl.locking.ActiveLock> |
activeLocks() |
void |
close() |
org.neo4j.kernel.impl.locking.Locks.Client |
optimistic() |
org.neo4j.kernel.impl.locking.Locks.Client |
pessimistic() |
void |
prepareForCommit(org.neo4j.kernel.impl.locking.LockTracer lockTracer) |
void |
stop() |
public org.neo4j.kernel.impl.locking.Locks.Client pessimistic()
pessimistic in interface org.neo4j.kernel.impl.locking.StatementLockspublic org.neo4j.kernel.impl.locking.Locks.Client optimistic()
optimistic in interface org.neo4j.kernel.impl.locking.StatementLockspublic void prepareForCommit(org.neo4j.kernel.impl.locking.LockTracer lockTracer)
prepareForCommit in interface org.neo4j.kernel.impl.locking.StatementLockspublic void stop()
stop in interface org.neo4j.kernel.impl.locking.StatementLockspublic void close()
close in interface AutoCloseableclose in interface org.neo4j.kernel.impl.locking.StatementLockspublic Stream<? extends org.neo4j.kernel.impl.locking.ActiveLock> activeLocks()
activeLocks in interface org.neo4j.kernel.impl.locking.StatementLockspublic long activeLockCount()
activeLockCount in interface org.neo4j.kernel.impl.locking.StatementLocksCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.