public interface TransactionBuilder
TitanGraph.buildTransaction() to build a new transaction.
The TransactionBuilder allows certain aspects of the resulting transaction to be configured up-front.| Modifier and Type | Method and Description |
|---|---|
TransactionBuilder |
checkInternalVertexExistence()
Enables checks that verify that each vertex actually exists in the underlying data store when it is retrieved.
|
TransactionBuilder |
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.
|
TransactionBuilder |
readOnly()
Makes the transaction read only.
|
TransactionBuilder |
setCommitTime(long timestampSinceEpoch,
TimeUnit unit)
Sets the timestamp for 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.
|
TransactionBuilder |
setGroupName(String name)
Sets the group name for this transaction which provides a way for gathering
reporting on multiple transactions into one group.
|
TransactionBuilder |
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.
|
TransactionBuilder |
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
|
TransactionBuilder readOnly()
TransactionBuilder enableBatchLoading()
TransactionBuilder setVertexCacheSize(int size)
size - TransactionBuilder setDirtyVertexSize(int size)
size - initial size of the transaction's dirty vertex collectionTransactionBuilder checkInternalVertexExistence()
TransactionBuilder setCommitTime(long timestampSinceEpoch, TimeUnit unit)
timestampSinceEpoch - number of units elapsed since the UNIX Epoch, that is,
00:00:00 UTC, Thursday, 1 January 1970unit - units of the timestampSinceEpoch argumentTransactionBuilder setGroupName(String name)
If 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.
name - Metric name prefix for this transactionTransactionBuilder setLogIdentifier(String logName)
logName - TransactionBuilder setRestrictedPartitions(int[] partitions)
partitions - TransactionBuilder setCustomOption(String k, Object v)
k - v - TitanTransaction start()
Copyright © 2012–2014. All rights reserved.