com.thinkaurelius.titan.graphdb.transaction

## Interface TransactionConfiguration

- All Superinterfaces:
    BaseTransactionConfig
  All Known Implementing Classes:
    StandardTransactionBuilder

      public interface TransactionConfiguration
      extends BaseTransactionConfig

  Provides configuration options for `TitanTransaction`.
  Author:
    Matthias Bröcheler (me@matthiasb.com);
  See Also:
    `TitanTransaction`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DefaultSchemaMaker` | `getAutoSchemaMaker()`
    `int` | `getDirtyVertexSize()` The initial size of the dirty (modified) vertex map used by a 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.
    `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` | `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` | `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.

    - ### Methods inherited from interface com.thinkaurelius.titan.diskstorage.BaseTransactionConfig

      `getCommitTime, getCustomOption, getCustomOptions, getGroupName, getTimestampProvider, hasCommitTime, hasGroupName, setCommitTime`

- - ### Method Detail

    - #### isReadOnly

          boolean isReadOnly()

      Checks whether the graph transaction is configured as read-only.
      Returns:
        True, if the transaction is configured as read-only, else false.

    - #### hasAssignIDsImmediately

          boolean hasAssignIDsImmediately()

      Returns:
        Whether this transaction is configured to assign idAuthorities immediately.

    - #### hasEnabledBatchLoading

          boolean hasEnabledBatchLoading()

      Whether this transaction should be optimized for batch-loading, i.e. ingestion of lots of data.
      Returns:

    - #### hasVerifyExternalVertexExistence

          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. In other words, it is verified that user provided vertex ids (through public APIs) actually exist.
      Returns:
        True, if vertex existence is verified, else false

    - #### hasVerifyInternalVertexExistence

          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. In other words, it is always verified that a vertex for a given id exists, even if that id is retrieved internally (through private APIs).

      Hence, this is a defensive setting against data degradation, where edges and/or index entries might point to no longer existing vertices. Use this setting with caution as it introduces additional overhead entailed by checking the existence.

      Unlike `hasVerifyExternalVertexExistence()` this is about internally verifying ids.
      Returns:
        True, if vertex existence is verified, else false

    - #### hasAcquireLocks

          boolean hasAcquireLocks()

      Whether the persistence layer should acquire locks for this transaction during persistence.
      Returns:
        True, if locks should be acquired, else false

    - #### getAutoSchemaMaker

          DefaultSchemaMaker getAutoSchemaMaker()

      Returns:
        The default edge type maker used to automatically create not yet existing edge types.

    - #### hasVerifyUniqueness

          boolean hasVerifyUniqueness()

      Whether the graph transaction is configured to verify that an added key does not yet exist in the database.
      Returns:
        True, if vertex existence is verified, else false

    - #### hasPropertyPrefetching

          boolean hasPropertyPrefetching()

      Whether this transaction loads all properties on a vertex when a single property is requested. This can be highly beneficial when additional properties are requested on the same vertex at a later time. For vertices with very many properties this might increase latencies of property fetching.
      Returns:
        True, if this transaction pre-fetches all properties

    - #### isSingleThreaded

          boolean isSingleThreaded()

      Whether this transaction is only accessed by a single thread. If so, then certain data structures may be optimized for single threaded access since locking can be avoided.
      Returns:

    - #### isThreadBound

          boolean isThreadBound()

      Whether this transaction is bound to a running thread. If so, then elements in this transaction can expand their life cycle to the next transaction in the thread.
      Returns:

    - #### getVertexCacheSize

          int getVertexCacheSize()

      The maximum number of recently-used vertices to cache in this transaction. The recently-used vertex cache can include both clean and dirty vertices.
      Returns:

    - #### getDirtyVertexSize

          int getDirtyVertexSize()

      The initial size of the dirty (modified) vertex map used by a transaction.
      Returns:

    - #### getIndexCacheWeight

          long getIndexCacheWeight()

      The maximum weight for the index cache store used in this particular transaction
      Returns:

    - #### getLogIdentifier

          String getLogIdentifier()

      The name of the log to be used for logging the mutations in this transaction. If the identifier is NULL the mutations will not be logged.
      Returns:

    - #### hasForceIndexUsage

          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.
      Returns:

    - #### getRestrictedPartitions

          int[] getRestrictedPartitions()

      Querying of partitioned vertices is restricted to the partitions returned by this method. If the return value has length 0 all partitions are queried (i.e. unrestricted).
      Returns:

    - #### hasRestrictedPartitions

          boolean hasRestrictedPartitions()

      Returns true of the queryied partitions should be restricted in this transaction

Copyright © 2012–2014. All rights reserved.