com.thinkaurelius.titan.diskstorage.locking

## Class LockerState<S>

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.locking.LockerState<S>

- Type Parameters:
    `S` - The `LockStatus` type.

      public class LockerState<S>
      extends Object

  A store for `LockStatus` objects. Thread-safe so long as the method calls with any given `StoreTransaction` are serial. Put another way, thread-safety is only broken by concurrently calling this class's methods with the same `StoreTransaction` instance in the arguments to each concurrent call.
  See Also:
    `AbstractLocker`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LockerState()`
    `LockerState(ConcurrentMap<StoreTransaction,Map<KeyColumn,S>> locks)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<KeyColumn,S>` | `getLocksForTx(StoreTransaction tx)`
    `boolean` | `has(StoreTransaction tx, KeyColumn kc)`
    `void` | `release(StoreTransaction tx, KeyColumn kc)`
    `void` | `take(StoreTransaction tx, KeyColumn kc, S ls)`

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

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

- - ### Constructor Detail

    - #### LockerState

          public LockerState()

    - #### LockerState

          public LockerState(ConcurrentMap<StoreTransaction,Map<KeyColumn,S>> locks)

  - ### Method Detail

    - #### has

          public boolean has(StoreTransaction tx,
                    KeyColumn kc)

    - #### take

          public void take(StoreTransaction tx,
                  KeyColumn kc,
                  S ls)

    - #### release

          public void release(StoreTransaction tx,
                     KeyColumn kc)

    - #### getLocksForTx

          public Map<KeyColumn,S> getLocksForTx(StoreTransaction tx)

Copyright © 2012–2014. All rights reserved.