org.apache.ignite.internal.processors.cache.store

## Interface CacheStoreManager

All Superinterfaces:
  GridCacheManager

All Known Implementing Classes:
  CacheOsStoreManager, GridCacheStoreManagerAdapter

    public interface CacheStoreManager
    extends GridCacheManager

Cache store manager interface.

### Method Summary

Methods
`boolean` `configured()`
`boolean` `configuredConvertBinary()`
`CacheStore<?,?>` `configuredStore()`
`boolean` `convertBinary()`
`void` `forceFlush()`
`void` `initialize(CacheStore<?,?> cfgStore, Map<CacheStore,ThreadLocal> sesHolders)` Initialize store manager.
`boolean` `isLocal()`
`boolean` `isWriteBehind()`
`boolean` `isWriteThrough()`
`boolean` `isWriteToStoreFromDht()`
`Object` `load(IgniteInternalTx tx, KeyCacheObject key)` Loads data from persistent store.
`boolean` `loadAll(IgniteInternalTx tx, Collection<? extends KeyCacheObject> keys, IgniteBiInClosure<KeyCacheObject,Object> vis)` Loads data from persistent store.
`boolean` `loadCache(GridInClosure3<KeyCacheObject,Object,GridCacheVersion> vis, Object[] args)` Loads data from persistent store.
`void` `localStoreLoadAll(IgniteInternalTx tx, Collection<? extends KeyCacheObject> keys, GridInClosure3<KeyCacheObject,Object,GridCacheVersion> vis)`
`boolean` `put(IgniteInternalTx tx, KeyCacheObject key, CacheObject val, GridCacheVersion ver)` Puts key-value pair into storage.
`boolean` `putAll(IgniteInternalTx tx, Map<? extends KeyCacheObject,IgniteBiTuple<? extends CacheObject,GridCacheVersion>> map)` Puts key-value pair into storage.
`boolean` `remove(IgniteInternalTx tx, KeyCacheObject key)`
`boolean` `removeAll(IgniteInternalTx tx, Collection<? extends KeyCacheObject> keys)`
`void` `sessionEnd(IgniteInternalTx tx, boolean commit, boolean last)`
`CacheStore<Object,Object>` `store()`
`void` `writeBehindSessionEnd(boolean threwEx)` End session initiated by write-behind store.
`void` `writeBehindSessionInit()` End session initiated by write-behind store.

### Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheManager

`onDisconnected, onKernalStart, onKernalStop, printMemoryStats, start, stop`

### Method Detail

#### initialize

    void initialize(@Nullable
                  CacheStore<?,?> cfgStore,
                  Map<CacheStore,ThreadLocal> sesHolders)
                    throws IgniteCheckedException

Initialize store manager.

Parameters:
  `cfgStore` - Actual store.
  `sesHolders` - Session holders.
Throws:
  `IgniteCheckedException` - If failed.

#### configured

    boolean configured()

Returns:
  `true` If store configured.

#### store

    CacheStore<Object,Object> store()

Returns:
  Wrapped store.

#### configuredStore

    CacheStore<?,?> configuredStore()

Returns:
  Unwrapped store provided in configuration.

#### isLocal

    boolean isLocal()

Returns:
  `true` If local store is configured.

#### isWriteThrough

    boolean isWriteThrough()

Returns:
  `True` is write-through is enabled.

#### isWriteBehind

    boolean isWriteBehind()

Returns:
  `True` is write-behind is enabled.

#### isWriteToStoreFromDht

    boolean isWriteToStoreFromDht()

Returns:
  Whether DHT transaction can write to store from DHT.

#### load

    @Nullable
    Object load(@Nullable
                       IgniteInternalTx tx,
                       KeyCacheObject key)
                throws IgniteCheckedException

Loads data from persistent store.

Parameters:
  `tx` - Cache transaction.
  `key` - Cache key.
Returns:
  Loaded value, possibly `null`.
Throws:
  `IgniteCheckedException` - If data loading failed.

#### loadAll

    boolean loadAll(@Nullable
                  IgniteInternalTx tx,
                  Collection<? extends KeyCacheObject> keys,
                  IgniteBiInClosure<KeyCacheObject,Object> vis)
                    throws IgniteCheckedException

Loads data from persistent store.

Parameters:
  `tx` - Cache transaction.
  `keys` - Cache keys.
  `vis` - Closure.
Returns:
  `True` if there is a persistent storage.
Throws:
  `IgniteCheckedException` - If data loading failed.

#### localStoreLoadAll

    void localStoreLoadAll(@Nullable
                         IgniteInternalTx tx,
                         Collection<? extends KeyCacheObject> keys,
                         GridInClosure3<KeyCacheObject,Object,GridCacheVersion> vis)
                           throws IgniteCheckedException

Parameters:
  `tx` - Cache transaction.
  `keys` - Cache keys.
  `vis` - Closure to apply for loaded elements.
Throws:
  `IgniteCheckedException` - If data loading failed.

#### loadCache

    boolean loadCache(GridInClosure3<KeyCacheObject,Object,GridCacheVersion> vis,
                    Object[] args)
                      throws IgniteCheckedException

Loads data from persistent store.

Parameters:
  `vis` - Closer to cache loaded elements.
  `args` - User arguments.
Returns:
  `True` if there is a persistent storage.
Throws:
  `IgniteCheckedException` - If data loading failed.

#### put

    boolean put(@Nullable
              IgniteInternalTx tx,
              KeyCacheObject key,
              CacheObject val,
              GridCacheVersion ver)
                throws IgniteCheckedException

Puts key-value pair into storage.

Parameters:
  `tx` - Cache transaction.
  `key` - Key.
  `val` - Value.
  `ver` - Version.
Returns:
  `true` If there is a persistent storage.
Throws:
  `IgniteCheckedException` - If storage failed.

#### putAll

    boolean putAll(@Nullable
                 IgniteInternalTx tx,
                 Map<? extends KeyCacheObject,IgniteBiTuple<? extends CacheObject,GridCacheVersion>> map)
                   throws IgniteCheckedException

Puts key-value pair into storage.

Parameters:
  `tx` - Cache transaction.
  `map` - Map.
Returns:
  `True` if there is a persistent storage.
Throws:
  `IgniteCheckedException` - If storage failed.

#### remove

    boolean remove(@Nullable
                 IgniteInternalTx tx,
                 KeyCacheObject key)
                   throws IgniteCheckedException

Parameters:
  `tx` - Cache transaction.
  `key` - Key.
Returns:
  `True` if there is a persistent storage.
Throws:
  `IgniteCheckedException` - If storage failed.

#### removeAll

    boolean removeAll(@Nullable
                    IgniteInternalTx tx,
                    Collection<? extends KeyCacheObject> keys)
                      throws IgniteCheckedException

Parameters:
  `tx` - Cache transaction.
  `keys` - Key.
Returns:
  `True` if there is a persistent storage.
Throws:
  `IgniteCheckedException` - If storage failed.

#### sessionEnd

    void sessionEnd(IgniteInternalTx tx,
                  boolean commit,
                  boolean last)
                    throws IgniteCheckedException

Parameters:
  `tx` - Transaction.
  `commit` - Commit.
Throws:
  `IgniteCheckedException` - If failed.

#### writeBehindSessionInit

    void writeBehindSessionInit()
                                throws IgniteCheckedException

End session initiated by write-behind store.

Throws:
  `IgniteCheckedException` - If failed.

#### writeBehindSessionEnd

    void writeBehindSessionEnd(boolean threwEx)
                               throws IgniteCheckedException

End session initiated by write-behind store.

Parameters:
  `threwEx` - If exception was thrown.
Throws:
  `IgniteCheckedException` - If failed.

#### forceFlush

    void forceFlush()
                    throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - If failed.

#### convertBinary

    boolean convertBinary()

Returns:
  Convert-binary flag.

#### configuredConvertBinary

    boolean configuredConvertBinary()

Returns:
  Configured convert binary flag.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017