org.apache.ignite.internal.processors.cache

## Interface IgniteCacheOffheapManager

All Superinterfaces:
  GridCacheManager

All Known Implementing Classes:
  IgniteCacheOffheapManagerImpl

    public interface IgniteCacheOffheapManager
    extends GridCacheManager

### Nested Class Summary

Nested Classes
`static interface` `IgniteCacheOffheapManager.CacheDataStore`
`static interface` `IgniteCacheOffheapManager.OffheapInvokeClosure`

### Method Summary

Methods
`Iterable<IgniteCacheOffheapManager.CacheDataStore>` `cacheDataStores()`
`void` `clear(boolean readers)` Clears offheap entries.
`boolean` `containsKey(GridCacheMapEntry entry)` TODO: GG-10884, used on only from initialValue.
`IgniteCacheOffheapManager.CacheDataStore` `createCacheDataStore(int p)`
`IgniteCacheOffheapManager.CacheDataStore` `dataStore(GridDhtLocalPartition part)`
`void` `destroyCacheDataStore(int p, IgniteCacheOffheapManager.CacheDataStore store)`
`void` `dropRootPageForIndex(String idxName)`
`long` `entriesCount()`
`long` `entriesCount(boolean primary, boolean backup, AffinityTopologyVersion topVer)`
`long` `entriesCount(int part)`
`<K,V> GridCloseableIterator<javax.cache.Cache.Entry<K,V>>` `entriesIterator(boolean primary, boolean backup, AffinityTopologyVersion topVer, boolean keepBinary)`
`boolean` `expire(IgniteInClosure2X<GridCacheEntryEx,GridCacheVersion> c, int amount)`
`long` `expiredSize()` Gets the number of entries pending expire.
`GridAtomicLong` `globalRemoveId()`
`void` `invoke(KeyCacheObject key, GridDhtLocalPartition part, IgniteCacheOffheapManager.OffheapInvokeClosure c)`
`GridIterator<CacheDataRow>` `iterator(boolean primary, boolean backup, AffinityTopologyVersion topVer)`
`GridIterator<CacheDataRow>` `iterator(int part)`
`GridCloseableIterator<KeyCacheObject>` `keysIterator(int part)`
`long` `lastUpdatedPartitionCounter(int part)` Partition counter provider.
`long` `offHeapAllocatedSize()`
`void` `onPartitionCounterUpdated(int part, long cntr)` Partition counter update callback.
`void` `onPartitionInitialCounterUpdated(int part, long cntr)` Initial counter will be updated on state restore only
`int` `onUndeploy(ClassLoader ldr)`
`CacheDataRow` `read(GridCacheMapEntry entry)`
`IgniteRebalanceIterator` `rebalanceIterator(int part, AffinityTopologyVersion topVer, Long partCntr)`
`void` `remove(KeyCacheObject key, int partId, GridDhtLocalPartition part)`
`ReuseList` `reuseListForIndex(String idxName)`
`RootPage` `rootPageForIndex(String idxName)`
`void` `update(KeyCacheObject key, CacheObject val, GridCacheVersion ver, long expireTime, int partId, GridDhtLocalPartition part, CacheDataRow oldRow)`

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

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

### Method Detail

#### onPartitionCounterUpdated

    void onPartitionCounterUpdated(int part,
                                 long cntr)

Partition counter update callback. May be overridden by plugin-provided subclasses.

Parameters:
  `part` - Partition.
  `cntr` - Partition counter.

#### onPartitionInitialCounterUpdated

    void onPartitionInitialCounterUpdated(int part,
                                        long cntr)

Initial counter will be updated on state restore only

Parameters:
  `part` - Partition
  `cntr` - New initial counter

#### lastUpdatedPartitionCounter

    long lastUpdatedPartitionCounter(int part)

Partition counter provider. May be overridden by plugin-provided subclasses.

Parameters:
  `part` - Partition ID.
Returns:
  Last updated counter.

#### read

    @Nullable
    CacheDataRow read(GridCacheMapEntry entry)
                      throws IgniteCheckedException

Parameters:
  `entry` - Cache entry.
Returns:
  Cached row, if available, null otherwise.
Throws:
  `IgniteCheckedException` - If failed.

#### createCacheDataStore

    IgniteCacheOffheapManager.CacheDataStore createCacheDataStore(int p)
                                                                  throws IgniteCheckedException

Parameters:
  `p` - Partition.
Returns:
  Data store.
Throws:
  `IgniteCheckedException` - If failed.

#### cacheDataStores

    Iterable<IgniteCacheOffheapManager.CacheDataStore> cacheDataStores()

Returns:
  Iterable over all existing cache data stores.

#### dataStore

    IgniteCacheOffheapManager.CacheDataStore dataStore(GridDhtLocalPartition part)

Parameters:
  `part` - Partition.
Returns:
  Data store.

#### destroyCacheDataStore

    void destroyCacheDataStore(int p,
                             IgniteCacheOffheapManager.CacheDataStore store)
                               throws IgniteCheckedException

Parameters:
  `p` - Partition ID.
  `store` - Data store.
Throws:
  `IgniteCheckedException`

#### containsKey

    boolean containsKey(GridCacheMapEntry entry)

TODO: GG-10884, used on only from initialValue.

#### expire

    boolean expire(IgniteInClosure2X<GridCacheEntryEx,GridCacheVersion> c,
                 int amount)
                   throws IgniteCheckedException

Parameters:
  `c` - Closure.
Throws:
  `IgniteCheckedException` - If failed.

#### expiredSize

    long expiredSize()
                     throws IgniteCheckedException

Gets the number of entries pending expire.

Returns:
  Number of pending entries.
Throws:
  `IgniteCheckedException` - If failed to get number of pending entries.

#### invoke

    void invoke(KeyCacheObject key,
              GridDhtLocalPartition part,
              IgniteCacheOffheapManager.OffheapInvokeClosure c)
                throws IgniteCheckedException

Parameters:
  `key` - Key.
  `part` - Partition.
  `c` - Tree update closure.
Throws:
  `IgniteCheckedException` - If failed.

#### update

    void update(KeyCacheObject key,
              CacheObject val,
              GridCacheVersion ver,
              long expireTime,
              int partId,
              GridDhtLocalPartition part,
              @Nullable
              CacheDataRow oldRow)
                throws IgniteCheckedException

Parameters:
  `key` - Key.
  `val` - Value.
  `ver` - Version.
  `expireTime` - Expire time.
  `partId` - Partition number.
  `oldRow` - Old row if available.
  `part` - Partition.
Throws:
  `IgniteCheckedException` - If failed.

#### remove

    void remove(KeyCacheObject key,
              int partId,
              GridDhtLocalPartition part)
                throws IgniteCheckedException

Parameters:
  `key` - Key.
  `partId` - Partition number.
  `part` - Partition.
Throws:
  `IgniteCheckedException` - If failed.

#### onUndeploy

    int onUndeploy(ClassLoader ldr)

Parameters:
  `ldr` - Class loader.
Returns:
  Number of undeployed entries.

#### iterator

    GridIterator<CacheDataRow> iterator(boolean primary,
                                      boolean backup,
                                      AffinityTopologyVersion topVer)
                                        throws IgniteCheckedException

Parameters:
  `primary` - Primary entries flag.
  `backup` - Backup entries flag.
  `topVer` - Topology version.
Returns:
  Rows iterator.
Throws:
  `IgniteCheckedException` - If failed.

#### iterator

    GridIterator<CacheDataRow> iterator(int part)
                                        throws IgniteCheckedException

Parameters:
  `part` - Partition.
Returns:
  Partition data iterator.
Throws:
  `IgniteCheckedException` - If failed.

#### rebalanceIterator

    IgniteRebalanceIterator rebalanceIterator(int part,
                                            AffinityTopologyVersion topVer,
                                            Long partCntr)
                                              throws IgniteCheckedException

Parameters:
  `part` - Partition.
  `partCntr` - Partition counter to get historical data if available.
Returns:
  Partition data iterator.
Throws:
  `IgniteCheckedException` - If failed.

#### entriesIterator

    <K,V> GridCloseableIterator<javax.cache.Cache.Entry<K,V>> entriesIterator(boolean primary,
                                                                            boolean backup,
                                                                            AffinityTopologyVersion topVer,
                                                                            boolean keepBinary)
                                                                        throws IgniteCheckedException

Parameters:
  `primary` - Primary entries flag.
  `backup` - Backup entries flag.
  `topVer` - Topology version.
  `keepBinary` - Keep binary flag.
Returns:
  Entries iterator.
Throws:
  `IgniteCheckedException` - If failed.

#### keysIterator

    GridCloseableIterator<KeyCacheObject> keysIterator(int part)
                                                       throws IgniteCheckedException

Parameters:
  `part` - Partition.
Returns:
  Iterator.
Throws:
  `IgniteCheckedException` - If failed.

#### entriesCount

    long entriesCount(boolean primary,
                    boolean backup,
                    AffinityTopologyVersion topVer)
                      throws IgniteCheckedException

Parameters:
  `primary` - Primary entries flag.
  `backup` - Backup entries flag.
  `topVer` - Topology version.
Returns:
  Entries count.
Throws:
  `IgniteCheckedException` - If failed.

#### clear

    void clear(boolean readers)

Clears offheap entries.

Parameters:
  `readers` - `True` to clear readers.

#### entriesCount

    long entriesCount(int part)

Parameters:
  `part` - Partition.
Returns:
  Number of entries in given partition.

#### offHeapAllocatedSize

    long offHeapAllocatedSize()

Returns:
  Offheap allocated size.

#### globalRemoveId

    GridAtomicLong globalRemoveId()

Returns:
  Global remove ID counter.

#### rootPageForIndex

    RootPage rootPageForIndex(String idxName)
                              throws IgniteCheckedException

Parameters:
  `idxName` - Index name.
Returns:
  Root page for index tree.
Throws:
  `IgniteCheckedException` - If failed.

#### dropRootPageForIndex

    void dropRootPageForIndex(String idxName)
                              throws IgniteCheckedException

Parameters:
  `idxName` - Index name.
Throws:
  `IgniteCheckedException` - If failed.

#### reuseListForIndex

    ReuseList reuseListForIndex(String idxName)
                                throws IgniteCheckedException

Returns:
  Reuse list for index tree.
Throws:
  `IgniteCheckedException`

#### entriesCount

    long entriesCount()

Returns:
  Number of entries.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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