public abstract class DistributedStoreManager extends AbstractStoreManager
| Modifier and Type | Class and Description |
|---|---|
static class |
DistributedStoreManager.Deployment |
class |
DistributedStoreManager.MaskedTimestamp
Helper class to create the deletion and addition timestamps for a particular transaction.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.time.Duration |
connectionTimeoutMS |
protected String[] |
hostnames |
protected int |
pageSize |
protected String |
password |
protected int |
port |
protected TimestampProvider |
times |
protected String |
username |
batchLoading, storageConfig, transactional| Constructor and Description |
|---|
DistributedStoreManager(Configuration storageConfig,
int portDefault) |
| Modifier and Type | Method and Description |
|---|---|
abstract DistributedStoreManager.Deployment |
getDeployment()
Returns the
DistributedStoreManager.Deployment mode of this connection to the storage backend |
int |
getPageSize()
Returns the default configured page size for this storage backend.
|
protected String |
getSingleHostname()
Returns a randomly chosen host name.
|
TimestampProvider |
getTimestampProvider() |
boolean |
hasAuthentication()
Whether authentication is enabled for this storage backend
|
protected void |
sleepAfterWrite(StoreTransaction txh,
DistributedStoreManager.MaskedTimestamp mustPass)
This method attempts to generate Rid in the following three ways, in order,
returning the value produced by the first successful attempt in the sequence.
|
String |
toString() |
getMetaDataSchema, getStorageConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbeginTransaction, clearStorage, close, getFeatures, getLocalKeyPartition, getNameprotected final TimestampProvider times
protected final String[] hostnames
protected final int port
protected final java.time.Duration connectionTimeoutMS
protected final int pageSize
protected final String username
protected final String password
public DistributedStoreManager(Configuration storageConfig, int portDefault)
protected String getSingleHostname()
public boolean hasAuthentication()
public int getPageSize()
public TimestampProvider getTimestampProvider()
public abstract DistributedStoreManager.Deployment getDeployment()
DistributedStoreManager.Deployment mode of this connection to the storage backendprotected void sleepAfterWrite(StoreTransaction txh, DistributedStoreManager.MaskedTimestamp mustPass) throws BackendException
config contains GraphDatabaseConfiguration#INSTANCE_RID_RAW_KEY,
then read it as a String value. Convert the String returned into a char[] and
call org.apache.commons.codec.binary.Hex#decodeHex on the char[]. The
byte[] returned by decodeHex is then returned as Rid.
config contains GraphDatabaseConfiguration#INSTANCE_RID_SHORT_KEY,
then read it as a short value. Call InetAddress.getLocalHost(),
and on its return value call InetAddress.getAddress() to retrieve
the machine's IP address in byte[] form. The returned Rid is a byte[] containing
the localhost address bytes in its lower indices and the short value in its
penultimate and final indices.
RuntimeMXBean.getName() and then call
String#getBytes() on the returned value. Return a Rid as described in the
previous point, replacing the short value with the byte[] representing the JVM name.
config - commons config from which to read Rid-related keysBackendExceptionCopyright © 2012–2015. All rights reserved.