public class MasterImpl extends org.neo4j.kernel.lifecycle.LifecycleAdapter implements Master
MasterClient and
MasterServer.| Modifier and Type | Class and Description |
|---|---|
static interface |
MasterImpl.Monitor |
static interface |
MasterImpl.SPI |
| Modifier and Type | Field and Description |
|---|---|
static int |
TX_TIMEOUT_ADDITION |
static int |
UNFINISHED_TRANSACTION_CLEANUP_DELAY |
| Constructor and Description |
|---|
MasterImpl(MasterImpl.SPI spi,
MasterImpl.Monitor monitor,
org.neo4j.kernel.logging.Logging logging,
org.neo4j.kernel.configuration.Config config) |
MasterImpl(MasterImpl.SPI spi,
MasterImpl.Monitor monitor,
org.neo4j.kernel.logging.Logging logging,
org.neo4j.kernel.configuration.Config config,
int staleSlaveReapIntervalMillis) |
| Modifier and Type | Method and Description |
|---|---|
org.neo4j.com.Response<LockResult> |
acquireExclusiveLock(org.neo4j.com.RequestContext context,
org.neo4j.kernel.impl.locking.Locks.ResourceType type,
long... resourceIds) |
org.neo4j.com.Response<LockResult> |
acquireSharedLock(org.neo4j.com.RequestContext context,
org.neo4j.kernel.impl.locking.Locks.ResourceType type,
long... resourceIds) |
org.neo4j.com.Response<IdAllocation> |
allocateIds(org.neo4j.com.RequestContext context,
org.neo4j.kernel.IdType idType) |
org.neo4j.com.Response<Long> |
commit(org.neo4j.com.RequestContext context,
org.neo4j.kernel.impl.transaction.TransactionRepresentation preparedTransaction)
Calling this method will validate, persist to log and apply changes to stores on
the master.
|
org.neo4j.com.Response<Void> |
copyStore(org.neo4j.com.RequestContext requestContext,
org.neo4j.com.storecopy.StoreWriter writer) |
org.neo4j.com.Response<Integer> |
createLabel(org.neo4j.com.RequestContext context,
String name) |
org.neo4j.com.Response<Integer> |
createPropertyKey(org.neo4j.com.RequestContext context,
String name) |
org.neo4j.com.Response<Integer> |
createRelationshipType(org.neo4j.com.RequestContext context,
String name) |
org.neo4j.com.Response<Void> |
endLockSession(org.neo4j.com.RequestContext context,
boolean success)
Calling this will end the current lock session (identified by the
RequestContext),
releasing all cluster-global locks held. |
Map<Integer,Collection<org.neo4j.com.RequestContext>> |
getOngoingTransactions() |
org.neo4j.com.Response<HandshakeResult> |
handshake(long txId,
org.neo4j.kernel.impl.store.StoreId storeId)
Gets the master id for a given txId, also a checksum for that tx.
|
org.neo4j.com.Response<Void> |
newLockSession(org.neo4j.com.RequestContext context)
Calling this method will create a new session with the cluster lock manager and associate that
session with the provided
RequestContext. |
org.neo4j.com.Response<Void> |
pullUpdates(org.neo4j.com.RequestContext context) |
void |
start() |
void |
stop() |
public static final int TX_TIMEOUT_ADDITION
public static final int UNFINISHED_TRANSACTION_CLEANUP_DELAY
public MasterImpl(MasterImpl.SPI spi, MasterImpl.Monitor monitor, org.neo4j.kernel.logging.Logging logging, org.neo4j.kernel.configuration.Config config)
public MasterImpl(MasterImpl.SPI spi, MasterImpl.Monitor monitor, org.neo4j.kernel.logging.Logging logging, org.neo4j.kernel.configuration.Config config, int staleSlaveReapIntervalMillis)
public void start()
throws Throwable
start in interface org.neo4j.kernel.lifecycle.Lifecyclestart in class org.neo4j.kernel.lifecycle.LifecycleAdapterThrowablepublic void stop()
stop in interface org.neo4j.kernel.lifecycle.Lifecyclestop in class org.neo4j.kernel.lifecycle.LifecycleAdapterpublic org.neo4j.com.Response<IdAllocation> allocateIds(org.neo4j.com.RequestContext context, org.neo4j.kernel.IdType idType)
allocateIds in interface Masterpublic org.neo4j.com.Response<Long> commit(org.neo4j.com.RequestContext context, org.neo4j.kernel.impl.transaction.TransactionRepresentation preparedTransaction) throws IOException, org.neo4j.kernel.api.exceptions.TransactionFailureException
Mastercommit in interface MasterIOExceptionorg.neo4j.kernel.api.exceptions.TransactionFailureExceptionpublic org.neo4j.com.Response<Integer> createRelationshipType(org.neo4j.com.RequestContext context, String name)
createRelationshipType in interface Masterpublic org.neo4j.com.Response<Integer> createPropertyKey(org.neo4j.com.RequestContext context, String name)
createPropertyKey in interface Masterpublic org.neo4j.com.Response<Integer> createLabel(org.neo4j.com.RequestContext context, String name)
createLabel in interface Masterpublic org.neo4j.com.Response<Void> pullUpdates(org.neo4j.com.RequestContext context)
pullUpdates in interface Masterpublic org.neo4j.com.Response<HandshakeResult> handshake(long txId, org.neo4j.kernel.impl.store.StoreId storeId)
Masterpublic org.neo4j.com.Response<Void> copyStore(org.neo4j.com.RequestContext requestContext, org.neo4j.com.storecopy.StoreWriter writer)
public org.neo4j.com.Response<Void> newLockSession(org.neo4j.com.RequestContext context) throws org.neo4j.kernel.api.exceptions.TransactionFailureException
MasterRequestContext.newLockSession in interface Masterorg.neo4j.kernel.api.exceptions.TransactionFailureExceptionpublic org.neo4j.com.Response<Void> endLockSession(org.neo4j.com.RequestContext context, boolean success)
MasterRequestContext),
releasing all cluster-global locks held.endLockSession in interface Masterpublic org.neo4j.com.Response<LockResult> acquireExclusiveLock(org.neo4j.com.RequestContext context, org.neo4j.kernel.impl.locking.Locks.ResourceType type, long... resourceIds)
acquireExclusiveLock in interface Masterpublic org.neo4j.com.Response<LockResult> acquireSharedLock(org.neo4j.com.RequestContext context, org.neo4j.kernel.impl.locking.Locks.ResourceType type, long... resourceIds)
acquireSharedLock in interface Masterpublic Map<Integer,Collection<org.neo4j.com.RequestContext>> getOngoingTransactions()
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.