com.hammurapi.store.local

## Class LocalStoreImpl.LocalDeputyStore<T,PK>

- java.lang.Object
- - com.hammurapi.store.AbstractStore<T,PK,S>
  - - com.hammurapi.store.DeputyStore<T,PK,LocalStore<T,PK>>
    - - com.hammurapi.store.local.LocalStoreImpl.LocalDeputyStore<T,PK>

- All Implemented Interfaces:
    LocalStore<T,PK>, Store<T,PK,LocalStore<T,PK>>, Iterable<T>, ReadWriteLock
  Enclosing class:
    LocalStoreImpl<T,PK>

      protected static class LocalStoreImpl.LocalDeputyStore<T,PK>
      extends DeputyStore<T,PK,LocalStore<T,PK>>
      implements LocalStore<T,PK>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.hammurapi.store.AbstractStore

      `AbstractStore.ExtractorTask<V>, AbstractStore.IndexizationTask<V>, AbstractStore.QueryCallable<V>, AbstractStore.QueryItemCallable<V>, AbstractStore.QueryMultipleCallable<V>, AbstractStore.RemoveTask, AbstractStore.SelectorTask, AbstractStore.UpdateCallable, AbstractStore.ValueSelectorTask<V>`

    - ### Nested classes/interfaces inherited from interface com.hammurapi.store.Store

      `Store.Handle<T,PK,S extends Store<T,PK,S>>, Store.QueryTask<T,PK,S extends Store<?,PK,S>>, Store.StoreIterator<T>, Store.UpdateTask<T,PK,S extends Store<T,PK,S>>, Store.ViewType`

  - ### Field Summary

    - ### Fields inherited from class com.hammurapi.store.DeputyStore

      `master`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalStoreImpl.LocalDeputyStore(AbstractStore<T,PK,LocalStore<T,PK>> master, ReadWriteLock masterLock)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected LocalStore<T,PK>` | `createDeputy()` Creates a store which encapsulates current call state (e.g.
    `protected LocalStore<T,PK>` | `createLiveView(Predicate<T,LocalStore<T,PK>> selector)`
    `LocalStore<T,PK>` | `createUnmodifiableFacade()` Creates unmodifiable facade for this store.

    - ### Methods inherited from class com.hammurapi.store.DeputyStore

      `addIndex, clear, createCache, createHandle, createIndex, createIndexCollection, createMasterLock, createView, equals, get, get, getAll, getByPrimaryKey, getExecutorService, getIndices, getMaster, getNoPkStore, getPkStore, getPrimaryKeyExtractor, hashCode, iterator, onRemoved, put, query, queryAll, readLock, remove, remove, removeByPrimaryKey, toString, update, writeLock`

    - ### Methods inherited from class com.hammurapi.store.AbstractStore

      `createHandle, getHandles, getMultiple, put, query, queryMultiple, updateIndices`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.hammurapi.store.Store

      `addIndex, clear, createView, get, get, getAll, getByPrimaryKey, getMultiple, getPrimaryKeyExtractor, put, query, query, queryAll, queryMultiple, remove, remove, removeByPrimaryKey, update`

    - ### Methods inherited from interface java.util.concurrent.locks.ReadWriteLock

      `readLock, writeLock`

    - ### Methods inherited from interface java.lang.Iterable

      `iterator`

- - ### Constructor Detail

    - #### LocalStoreImpl.LocalDeputyStore

          public LocalStoreImpl.LocalDeputyStore(AbstractStore<T,PK,LocalStore<T,PK>> master,
                                         ReadWriteLock masterLock)

  - ### Method Detail

    - #### createDeputy

          protected LocalStore<T,PK> createDeputy()

      Description copied from class: `AbstractStore`
      Creates a store which encapsulates current call state (e.g. locks currently held) and can be passed to executor for asynchronous execution. Delegates operate on behalf of the master store. They don't acquire locks if the master store already holds them. If the master store holds read lock then attempt of a deputy to acquire write lock will result in StoreException.
      Specified by:
        `createDeputy` in class `AbstractStore<T,PK,LocalStore<T,PK>>`
      Returns:

    - #### createUnmodifiableFacade

          public LocalStore<T,PK> createUnmodifiableFacade()

      Description copied from interface: `Store`
      Creates unmodifiable facade for this store.
      Specified by:
        `createUnmodifiableFacade` in interface `Store<T,PK,LocalStore<T,PK>>`
      Returns:

    - #### createLiveView

          protected LocalStore<T,PK> createLiveView(Predicate<T,LocalStore<T,PK>> selector)

      Specified by:
        `createLiveView` in class `AbstractStore<T,PK,LocalStore<T,PK>>`