public class StandardTransactionBuilder extends Object implements TransactionConfiguration, TransactionBuilder
TitanTransaction.TitanTransaction| Constructor and Description |
|---|
StandardTransactionBuilder(GraphDatabaseConfiguration graphConfig,
StandardTitanGraph graph)
Constructs a new TitanTransaction configuration with default configuration parameters.
|
| Modifier and Type | Method and Description |
|---|---|
StandardTransactionBuilder |
checkInternalVertexExistence()
Enables checks that verify that each vertex actually exists in the underlying data store when it is retrieved.
|
StandardTransactionBuilder |
enableBatchLoading()
Enabling batch loading disables a number of consistency checks inside Titan to speed up the ingestion of
data under the assumptions that inconsistencies are resolved prior to loading.
|
DefaultSchemaMaker |
getAutoSchemaMaker() |
Timepoint |
getCommitTime()
Returns the commit time of this transaction which is either a custom timestamp provided
by the user, the commit time as set by the enclosing operation, or the first time this method is called.
|
<V> V |
getCustomOption(ConfigOption<V> opt)
Get an arbitrary transaction-specific option.
|
Configuration |
getCustomOptions()
Return any transaction-specific options.
|
int |
getDirtyVertexSize()
The initial size of the dirty (modified) vertex map used by a transaction.
|
String |
getGroupName()
Returns the (possibly null) group name for this transaction.
|
long |
getIndexCacheWeight()
The maximum weight for the index cache store used in this particular transaction
|
String |
getLogIdentifier()
The name of the log to be used for logging the mutations in this transaction.
|
int[] |
getRestrictedPartitions()
Querying of partitioned vertices is restricted to the partitions returned by this
method.
|
TimestampProvider |
getTimestampProvider()
Returns the timestamp provider of this transaction.
|
int |
getVertexCacheSize()
The maximum number of recently-used vertices to cache in this transaction.
|
boolean |
hasAcquireLocks()
Whether the persistence layer should acquire locks for this transaction during persistence.
|
boolean |
hasAssignIDsImmediately() |
boolean |
hasCommitTime()
Returns true if a commit time has been set on this transaction.
|
boolean |
hasEnabledBatchLoading()
Whether this transaction should be optimized for batch-loading, i.e.
|
boolean |
hasForceIndexUsage()
Whether this transaction should throw an exception when a graph query is issued that cannot be answered
with any existing index but instead requires a full graph-scan.
|
boolean |
hasGroupName()
True when
BaseTransactionConfig.getGroupName() is non-null, false when null. |
boolean |
hasPropertyPrefetching()
Whether this transaction loads all properties on a vertex when a single property is requested.
|
boolean |
hasRestrictedPartitions()
Returns true of the queryied partitions should be restricted in this transaction
|
boolean |
hasVerifyExternalVertexExistence()
Whether the graph transaction is configured to verify that a vertex with the id GIVEN BY THE USER actually exists
in the database or not.
|
boolean |
hasVerifyInternalVertexExistence()
Whether the graph transaction is configured to verify that a vertex with the id actually exists
in the database or not on every retrieval.
|
boolean |
hasVerifyUniqueness()
Whether the graph transaction is configured to verify that an added key does not yet exist in the database.
|
boolean |
isReadOnly()
Checks whether the graph transaction is configured as read-only.
|
boolean |
isSingleThreaded()
Whether this transaction is only accessed by a single thread.
|
boolean |
isThreadBound()
Whether this transaction is bound to a running thread.
|
StandardTransactionBuilder |
readOnly()
Makes the transaction read only.
|
StandardTransactionBuilder |
setCommitTime(long timestampSinceEpoch,
TimeUnit unit)
Sets the timestamp for this transaction.
|
void |
setCommitTime(Timepoint time)
Sets the commit time of this transaction.
|
TransactionBuilder |
setCustomOption(String k,
Object v)
Configures a custom option on this transaction which will be passed through to the storage and indexing backends.
|
TransactionBuilder |
setDirtyVertexSize(int size)
Configures the initial size of the map of modified vertices held by this
transaction.
|
StandardTransactionBuilder |
setGroupName(String p)
Sets the group name for this transaction which provides a way for gathering
reporting on multiple transactions into one group.
|
StandardTransactionBuilder |
setLogIdentifier(String logName)
Name of the log to be used for logging the mutations in this transaction.
|
TransactionBuilder |
setRestrictedPartitions(int[] partitions)
Configures this transaction such that queries against partitioned vertices are
restricted to the given partitions.
|
StandardTransactionBuilder |
setVertexCacheSize(int size)
Configures the size of the internal caches used in the transaction.
|
TitanTransaction |
start()
Starts and returns the transaction build by this builder
|
StandardTransactionBuilder |
threadBound() |
public StandardTransactionBuilder(GraphDatabaseConfiguration graphConfig, StandardTitanGraph graph)
public StandardTransactionBuilder threadBound()
public StandardTransactionBuilder readOnly()
TransactionBuilderreadOnly in interface TransactionBuilderpublic StandardTransactionBuilder enableBatchLoading()
TransactionBuilderenableBatchLoading in interface TransactionBuilderpublic StandardTransactionBuilder setVertexCacheSize(int size)
TransactionBuildersetVertexCacheSize in interface TransactionBuilderpublic TransactionBuilder setDirtyVertexSize(int size)
TransactionBuildersetDirtyVertexSize in interface TransactionBuildersize - initial size of the transaction's dirty vertex collectionpublic StandardTransactionBuilder checkInternalVertexExistence()
TransactionBuildercheckInternalVertexExistence in interface TransactionBuilderpublic StandardTransactionBuilder setCommitTime(long timestampSinceEpoch, TimeUnit unit)
TransactionBuildersetCommitTime in interface TransactionBuildertimestampSinceEpoch - number of units elapsed since the UNIX Epoch, that is,
00:00:00 UTC, Thursday, 1 January 1970unit - units of the timestampSinceEpoch argumentpublic void setCommitTime(Timepoint time)
BaseTransactionConfigBaseTransactionConfig.hasCommitTime() to check prior to setting.setCommitTime in interface BaseTransactionConfigpublic StandardTransactionBuilder setGroupName(String p)
TransactionBuilderIf null, Metrics collection is totally disabled for this transaction.
If empty, Metrics collection is enabled, but there will be no prefix. Where the default setting would generate metrics names in the form "prefix.x.y.z", this transaction will instead use metric names in the form "x.y.z".
If nonempty, Metrics collection is enabled and the prefix will be used for all of this transaction's measurements.
Note: setting this to a non-null value only partially overrides
GraphDatabaseConfiguration.BASIC_METRICS = false in the graph
database configuration. When Metrics are disabled at the graph level and
enabled at the transaction level, storage backend timings and counters
will remain disabled.
The default value is
GraphDatabaseConfiguration.METRICS_PREFIX_DEFAULT.
Sets the name prefix used for Metrics recorded by this transaction. If
metrics is enabled via GraphDatabaseConfiguration.BASIC_METRICS,
this string will be prepended to all Titan metric names.
setGroupName in interface TransactionBuilderp - Metric name prefix for this transactionpublic StandardTransactionBuilder setLogIdentifier(String logName)
TransactionBuildersetLogIdentifier in interface TransactionBuilderpublic TransactionBuilder setRestrictedPartitions(int[] partitions)
TransactionBuildersetRestrictedPartitions in interface TransactionBuilderpublic TransactionBuilder setCustomOption(String k, Object v)
TransactionBuildersetCustomOption in interface TransactionBuilderpublic TitanTransaction start()
TransactionBuilderstart in interface TransactionBuilderpublic final boolean isReadOnly()
TransactionConfigurationisReadOnly in interface TransactionConfigurationpublic final boolean hasAssignIDsImmediately()
hasAssignIDsImmediately in interface TransactionConfigurationpublic final boolean hasForceIndexUsage()
TransactionConfigurationhasForceIndexUsage in interface TransactionConfigurationpublic boolean hasEnabledBatchLoading()
TransactionConfigurationhasEnabledBatchLoading in interface TransactionConfigurationpublic final boolean hasVerifyExternalVertexExistence()
TransactionConfigurationhasVerifyExternalVertexExistence in interface TransactionConfigurationpublic final boolean hasVerifyInternalVertexExistence()
TransactionConfigurationTransactionConfiguration.hasVerifyExternalVertexExistence() this is about internally verifying ids.hasVerifyInternalVertexExistence in interface TransactionConfigurationpublic final boolean hasAcquireLocks()
TransactionConfigurationhasAcquireLocks in interface TransactionConfigurationpublic final DefaultSchemaMaker getAutoSchemaMaker()
getAutoSchemaMaker in interface TransactionConfigurationpublic final boolean hasVerifyUniqueness()
TransactionConfigurationhasVerifyUniqueness in interface TransactionConfigurationpublic boolean hasPropertyPrefetching()
TransactionConfigurationhasPropertyPrefetching in interface TransactionConfigurationpublic final boolean isSingleThreaded()
TransactionConfigurationisSingleThreaded in interface TransactionConfigurationpublic final boolean isThreadBound()
TransactionConfigurationisThreadBound in interface TransactionConfigurationpublic final int getVertexCacheSize()
TransactionConfigurationgetVertexCacheSize in interface TransactionConfigurationpublic final int getDirtyVertexSize()
TransactionConfigurationgetDirtyVertexSize in interface TransactionConfigurationpublic final long getIndexCacheWeight()
TransactionConfigurationgetIndexCacheWeight in interface TransactionConfigurationpublic String getLogIdentifier()
TransactionConfigurationgetLogIdentifier in interface TransactionConfigurationpublic int[] getRestrictedPartitions()
TransactionConfigurationgetRestrictedPartitions in interface TransactionConfigurationpublic boolean hasRestrictedPartitions()
TransactionConfigurationhasRestrictedPartitions in interface TransactionConfigurationpublic String getGroupName()
BaseTransactionConfiggetGroupName in interface BaseTransactionConfigpublic boolean hasGroupName()
BaseTransactionConfigBaseTransactionConfig.getGroupName() is non-null, false when null.hasGroupName in interface BaseTransactionConfigpublic Timepoint getCommitTime()
BaseTransactionConfiggetCommitTime in interface BaseTransactionConfigpublic boolean hasCommitTime()
BaseTransactionConfighasCommitTime in interface BaseTransactionConfigpublic <V> V getCustomOption(ConfigOption<V> opt)
BaseTransactionConfiggetCustomOption in interface BaseTransactionConfigopt - option for which to return a valuepublic Configuration getCustomOptions()
BaseTransactionConfiggetCustomOptions in interface BaseTransactionConfigBaseTransactionConfig.getCustomOption(ConfigOption)public TimestampProvider getTimestampProvider()
BaseTransactionConfiggetTimestampProvider in interface BaseTransactionConfigCopyright © 2012–2014. All rights reserved.