public class PlatformCache extends PlatformAbstractTarget
| Modifier and Type | Field and Description |
|---|---|
static int |
OP_CLEAR |
static int |
OP_CLEAR_ALL |
static int |
OP_CONTAINS_KEY |
static int |
OP_CONTAINS_KEYS |
static int |
OP_GET |
static int |
OP_GET_ALL |
static int |
OP_GET_AND_PUT |
static int |
OP_GET_AND_PUT_IF_ABSENT |
static int |
OP_GET_AND_REMOVE |
static int |
OP_GET_AND_REPLACE |
static int |
OP_GET_CONFIG |
static int |
OP_GET_NAME |
static int |
OP_INVOKE |
static int |
OP_INVOKE_ALL |
static int |
OP_IS_LOCAL_LOCKED |
static int |
OP_LOAD_ALL |
static int |
OP_LOAD_CACHE |
static int |
OP_LOC_EVICT |
static int |
OP_LOC_LOAD_CACHE |
static int |
OP_LOC_PROMOTE |
static int |
OP_LOCAL_CLEAR |
static int |
OP_LOCAL_CLEAR_ALL |
static int |
OP_LOCK |
static int |
OP_LOCK_ALL |
static int |
OP_METRICS |
static int |
OP_PUT_IF_ABSENT |
static int |
OP_QRY_CONTINUOUS |
static int |
OP_QRY_SCAN |
static int |
OP_QRY_SQL |
static int |
OP_QRY_SQL_FIELDS |
static int |
OP_QRY_TXT |
static int |
OP_REMOVE_ALL |
static int |
OP_REMOVE_BOOL |
static int |
OP_REMOVE_OBJ |
static int |
OP_REPLACE_2 |
static int |
OP_REPLACE_3 |
FALSE, log, platformCtx, TRUE| Constructor and Description |
|---|
PlatformCache(PlatformContext platformCtx,
IgniteCache cache,
boolean keepBinary)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the contents of the cache, without notifying listeners or CacheWriters.
|
void |
closeLock(long id)
Unregister lock.
|
Exception |
convertException(Exception e)
Convert caught exception.
|
protected IgniteInternalFuture |
currentFuture()
|
void |
enterLock(long id)
Enters a lock.
|
void |
exitLock(long id)
Exits a lock.
|
protected PlatformFutureUtils.Writer |
futureWriter(int opId)
|
PlatformCacheIterator |
iterator()
Create cache iterator.
|
PlatformCacheIterator |
localIterator(int peekModes)
Create cache iterator over local entries.
|
protected long |
processInStreamOutLong(int type,
BinaryRawReaderEx reader)
Process IN operation.
|
protected Object |
processInStreamOutObject(int type,
BinaryRawReaderEx reader)
Process IN operation with managed object as result.
|
protected void |
processInStreamOutStream(int type,
BinaryRawReaderEx reader,
BinaryRawWriterEx writer)
Process IN-OUT operation.
|
protected void |
processOutStream(int type,
BinaryRawWriterEx writer)
Process OUT operation.
|
void |
rebalance(long futId)
Rebalances the cache.
|
void |
removeAll()
Removes all entries.
|
int |
size(int peekModes,
boolean loc)
Read cache size.
|
boolean |
tryEnterLock(long id,
long timeout)
Attempts to enter a lock.
|
PlatformCache |
withAsync()
Gets cache with asynchronous mode enabled.
|
PlatformCache |
withExpiryPolicy(long create,
long update,
long access)
Gets cache with provided expiry policy.
|
PlatformCache |
withKeepBinary()
Gets cache with "keep binary" flag.
|
PlatformCache |
withNoRetries()
Gets cache with no-retries mode enabled.
|
PlatformCache |
withSkipStore()
Gets cache with "skip-store" flag set.
|
inObjectStreamOutStream, inStreamOutLong, inStreamOutObject, inStreamOutStream, listenFuture, listenFutureAndGet, listenFutureForOperation, listenFutureForOperationAndGet, outLong, outObject, outStream, platformContext, processInObjectStreamOutStream, processOutLong, processOutObject, throwUnsupportedpublic static final int OP_CLEAR
public static final int OP_CLEAR_ALL
public static final int OP_CONTAINS_KEY
public static final int OP_CONTAINS_KEYS
public static final int OP_GET
public static final int OP_GET_ALL
public static final int OP_GET_AND_PUT
public static final int OP_GET_AND_PUT_IF_ABSENT
public static final int OP_GET_AND_REMOVE
public static final int OP_GET_AND_REPLACE
public static final int OP_GET_NAME
public static final int OP_INVOKE
public static final int OP_INVOKE_ALL
public static final int OP_IS_LOCAL_LOCKED
public static final int OP_LOAD_CACHE
public static final int OP_LOC_EVICT
public static final int OP_LOC_LOAD_CACHE
public static final int OP_LOC_PROMOTE
public static final int OP_LOCAL_CLEAR
public static final int OP_LOCAL_CLEAR_ALL
public static final int OP_LOCK
public static final int OP_LOCK_ALL
public static final int OP_METRICS
public static final int OP_PUT_IF_ABSENT
public static final int OP_QRY_CONTINUOUS
public static final int OP_QRY_SCAN
public static final int OP_QRY_SQL
public static final int OP_QRY_SQL_FIELDS
public static final int OP_QRY_TXT
public static final int OP_REMOVE_ALL
public static final int OP_REMOVE_BOOL
public static final int OP_REMOVE_OBJ
public static final int OP_REPLACE_2
public static final int OP_REPLACE_3
public static final int OP_GET_CONFIG
public static final int OP_LOAD_ALL
public PlatformCache(PlatformContext platformCtx, IgniteCache cache, boolean keepBinary)
platformCtx - Context.cache - Underlying cache.keepBinary - Keep binary flag.public PlatformCache withSkipStore()
public PlatformCache withKeepBinary()
public PlatformCache withExpiryPolicy(long create, long update, long access)
create - Create.update - Update.access - Access.public PlatformCache withAsync()
public PlatformCache withNoRetries()
protected long processInStreamOutLong(int type,
BinaryRawReaderEx reader)
throws IgniteCheckedException
processInStreamOutLong in class PlatformAbstractTargettype - Type.reader - Binary reader.IgniteCheckedException - In case of exception.protected Object processInStreamOutObject(int type, BinaryRawReaderEx reader) throws IgniteCheckedException
processInStreamOutObject in class PlatformAbstractTargettype - Type.reader - Binary reader.IgniteCheckedException - In case of exception.protected void processOutStream(int type,
BinaryRawWriterEx writer)
throws IgniteCheckedException
processOutStream in class PlatformAbstractTargettype - Type.writer - Binary writer.IgniteCheckedException - In case of exception.protected void processInStreamOutStream(int type,
BinaryRawReaderEx reader,
BinaryRawWriterEx writer)
throws IgniteCheckedException
processInStreamOutStream in class PlatformAbstractTargettype - Type.reader - Binary reader.writer - Binary writer.IgniteCheckedException - In case of exception.public Exception convertException(Exception e)
convertException in class PlatformAbstractTargete - Exception to convert.protected IgniteInternalFuture currentFuture() throws IgniteCheckedException
currentFuture in class PlatformAbstractTargetIgniteCheckedException@Nullable protected PlatformFutureUtils.Writer futureWriter(int opId)
futureWriter in class PlatformAbstractTargetopId - Operation id.public void clear()
throws IgniteCheckedException
IllegalStateException - if the cache is closed.javax.cache.CacheException - if there is a problem during the clearIgniteCheckedExceptionpublic void removeAll()
throws IgniteCheckedException
IgniteCheckedException - In case of error.public int size(int peekModes,
boolean loc)
peekModes - Encoded peek modes.loc - Local mode flag.public PlatformCacheIterator iterator()
public PlatformCacheIterator localIterator(int peekModes)
peekModes - Peke modes.public void enterLock(long id)
throws InterruptedException
id - Lock id.InterruptedExceptionpublic void exitLock(long id)
id - Lock id.public boolean tryEnterLock(long id,
long timeout)
throws InterruptedException
id - Lock id.timeout - Timeout, in milliseconds. -1 for infinite timeout.InterruptedExceptionpublic void rebalance(long futId)
futId - Future id.public void closeLock(long id)
id - Lock id.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.6.0 Release Date : May 18 2016