com.thinkaurelius.titan.diskstorage.util

## Class StandardBaseTransactionConfig

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.util.StandardBaseTransactionConfig

- All Implemented Interfaces:
    BaseTransactionConfig

      public class StandardBaseTransactionConfig
      extends Object
      implements BaseTransactionConfig

  Author:
    Matthias Broecheler (me@matthiasb.com), Dan LaRocque

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StandardBaseTransactionConfig.Builder`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `String` | `getGroupName()` Returns the (possibly null) group name for this transaction.
    `TimestampProvider` | `getTimestampProvider()` Returns the timestamp provider of this transaction.
    `boolean` | `hasCommitTime()` Returns true if a commit time has been set on this transaction.
    `boolean` | `hasGroupName()` True when `BaseTransactionConfig.getGroupName()` is non-null, false when null.
    `static StandardBaseTransactionConfig` | `of(TimestampProvider times)`
    `static StandardBaseTransactionConfig` | `of(TimestampProvider times, Configuration customOptions)`
    `void` | `setCommitTime(Timepoint time)` Sets the commit time of this transaction.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getCommitTime

          public Timepoint getCommitTime()

      Description copied from interface: `BaseTransactionConfig`
      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.
      Specified by:
        `getCommitTime` in interface `BaseTransactionConfig`
      Returns:
        commit timestamp for this transaction

    - #### setCommitTime

          public void setCommitTime(Timepoint time)

      Description copied from interface: `BaseTransactionConfig`
      Sets the commit time of this transaction. If a commit time has already been set, this method throws an exception. Use `BaseTransactionConfig.hasCommitTime()` to check prior to setting.
      Specified by:
        `setCommitTime` in interface `BaseTransactionConfig`

    - #### hasCommitTime

          public boolean hasCommitTime()

      Description copied from interface: `BaseTransactionConfig`
      Returns true if a commit time has been set on this transaction.
      Specified by:
        `hasCommitTime` in interface `BaseTransactionConfig`
      Returns:

    - #### getTimestampProvider

          public TimestampProvider getTimestampProvider()

      Description copied from interface: `BaseTransactionConfig`
      Returns the timestamp provider of this transaction.
      Specified by:
        `getTimestampProvider` in interface `BaseTransactionConfig`

    - #### hasGroupName

          public boolean hasGroupName()

      Description copied from interface: `BaseTransactionConfig`
      True when `BaseTransactionConfig.getGroupName()` is non-null, false when null.
      Specified by:
        `hasGroupName` in interface `BaseTransactionConfig`

    - #### getGroupName

          public String getGroupName()

      Description copied from interface: `BaseTransactionConfig`
      Returns the (possibly null) group name for this transaction. Transactions are grouped under this name for reporting and error tracking purposes.
      Specified by:
        `getGroupName` in interface `BaseTransactionConfig`
      Returns:
        group name prefix string or null

    - #### getCustomOption

          public <V> V getCustomOption(ConfigOption<V> opt)

      Description copied from interface: `BaseTransactionConfig`
      Get an arbitrary transaction-specific option.
      Specified by:
        `getCustomOption` in interface `BaseTransactionConfig`
      Parameters:
        `opt` - option for which to return a value
      Returns:
        value of the option

    - #### getCustomOptions

          public Configuration getCustomOptions()

      Description copied from interface: `BaseTransactionConfig`
      Return any transaction-specific options.
      Specified by:
        `getCustomOptions` in interface `BaseTransactionConfig`
      Returns:
        options for this tx
      See Also:
        `BaseTransactionConfig.getCustomOption(ConfigOption)`

    - #### of

          public static StandardBaseTransactionConfig of(TimestampProvider times)

    - #### of

          public static StandardBaseTransactionConfig of(TimestampProvider times,
                                         Configuration customOptions)

Copyright © 2012–2014. All rights reserved.