public abstract class GridCacheMessage extends Object implements Message
| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_MSG_INDEX_FIELD_NAME
Cache message index field name.
|
protected int |
cacheId
Cache ID.
|
static int |
MAX_CACHE_MSG_LOOKUP_INDEX
Maximum number of cache lookup indexes.
|
| Constructor and Description |
|---|
GridCacheMessage() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowForStartup() |
int |
cacheId() |
void |
cacheId(int cacheId) |
Exception |
classError() |
GridDeploymentInfo |
deployInfo() |
void |
finishUnmarshal(GridCacheSharedContext ctx,
ClassLoader ldr)
This method is called after the message is deserialized and is responsible for
unmarshalling state marshalled in
prepareMarshal(GridCacheSharedContext) method. |
protected void |
finishUnmarshalCacheObjects(Collection<? extends CacheObject> col,
GridCacheContext ctx,
ClassLoader ldr) |
protected void |
finishUnmarshalCacheObjects(List<? extends CacheObject> col,
GridCacheContext ctx,
ClassLoader ldr) |
boolean |
ignoreClassErrors() |
int |
lookupIndex()
Gets message lookup index.
|
protected LinkedHashMap<byte[],Boolean> |
marshalBooleanLinkedMap(LinkedHashMap<?,Boolean> map,
GridCacheSharedContext ctx) |
protected List<byte[]> |
marshalCollection(Collection<?> col,
GridCacheSharedContext ctx) |
protected void |
marshalInfo(GridCacheEntryInfo info,
GridCacheContext ctx) |
protected void |
marshalInfos(Iterable<? extends GridCacheEntryInfo> infos,
GridCacheContext ctx) |
protected byte[][] |
marshalInvokeArguments(Object[] args,
GridCacheSharedContext ctx) |
protected void |
marshalTx(Iterable<IgniteTxEntry> txEntries,
GridCacheSharedContext ctx) |
long |
messageId() |
static int |
nextIndexId()
Gets next ID for indexed message ID.
|
void |
onClassError(Exception err)
If class loading error occurred during unmarshalling and
ignoreClassErrors() is
set to true, then the error will be passed into this method. |
void |
prepare(GridDeploymentInfo depInfo) |
void |
prepareMarshal(GridCacheSharedContext ctx)
This method is called before the whole message is serialized
and is responsible for pre-marshalling state.
|
protected void |
prepareMarshalCacheObjects(Collection<? extends CacheObject> col,
GridCacheContext ctx) |
protected void |
prepareMarshalCacheObjects(List<? extends CacheObject> col,
GridCacheContext ctx) |
protected void |
prepareObject(Object o,
GridCacheSharedContext ctx) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
long |
topologyVersion()
Gets topology version or -1 in case of topology version is not required for this message.
|
String |
toString() |
protected boolean |
transferExpiryPolicy() |
protected <K1> LinkedHashMap<K1,Boolean> |
unmarshalBooleanLinkedMap(Map<byte[],Boolean> byteMap,
GridCacheSharedContext ctx,
ClassLoader ldr) |
protected <T> List<T> |
unmarshalCollection(Collection<byte[]> byteCol,
GridCacheSharedContext ctx,
ClassLoader ldr) |
protected void |
unmarshalInfo(GridCacheEntryInfo info,
GridCacheContext ctx,
ClassLoader ldr) |
protected void |
unmarshalInfos(Iterable<? extends GridCacheEntryInfo> infos,
GridCacheContext ctx,
ClassLoader ldr) |
protected Object[] |
unmarshalInvokeArguments(byte[][] byteCol,
GridCacheSharedContext ctx,
ClassLoader ldr) |
protected void |
unmarshalTx(Iterable<IgniteTxEntry> txEntries,
boolean near,
GridCacheSharedContext ctx,
ClassLoader ldr) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdirectType, fieldsCountpublic static final int MAX_CACHE_MSG_LOOKUP_INDEX
public static final String CACHE_MSG_INDEX_FIELD_NAME
protected int cacheId
public static int nextIndexId()
public boolean allowForStartup()
True if this message is preloader message.public boolean ignoreClassErrors()
True if class loading errors should be ignored, false otherwise.public int lookupIndex()
MAX_CACHE_MSG_LOOKUP_INDEX.public void onClassError(Exception err)
ignoreClassErrors() is
set to true, then the error will be passed into this method.err - Error.public Exception classError()
onClassError(Exception) method.public long messageId()
public int cacheId()
public void cacheId(int cacheId)
cacheId - Cache ID.public long topologyVersion()
protected final void prepareObject(@Nullable Object o, GridCacheSharedContext ctx) throws IgniteCheckedException
o - Object to prepare for marshalling.ctx - Context.IgniteCheckedException - If failed.public final void prepare(GridDeploymentInfo depInfo)
depInfo - Deployment to set.GridCacheDeployable.prepare(GridDeploymentInfo)public GridDeploymentInfo deployInfo()
GridCacheDeployable.deployInfo()public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException
ctx - Cache context.IgniteCheckedException - If failed.public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
prepareMarshal(GridCacheSharedContext) method.ctx - Context.ldr - Class loader.IgniteCheckedException - If failed.protected final void marshalInfo(GridCacheEntryInfo info, GridCacheContext ctx) throws IgniteCheckedException
info - Entry to marshal.ctx - Context.IgniteCheckedException - If failed.protected final void unmarshalInfo(GridCacheEntryInfo info, GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
info - Entry to unmarshal.ctx - Context.ldr - Loader.IgniteCheckedException - If failed.protected final void marshalInfos(Iterable<? extends GridCacheEntryInfo> infos, GridCacheContext ctx) throws IgniteCheckedException
infos - Entries to marshal.ctx - Context.IgniteCheckedException - If failed.protected final void unmarshalInfos(Iterable<? extends GridCacheEntryInfo> infos, GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
infos - Entries to unmarshal.ctx - Context.ldr - Loader.IgniteCheckedException - If failed.protected final void marshalTx(Iterable<IgniteTxEntry> txEntries, GridCacheSharedContext ctx) throws IgniteCheckedException
txEntries - Entries to marshal.ctx - Context.IgniteCheckedException - If failed.protected boolean transferExpiryPolicy()
True if entries expire policy should be marshalled.protected final void unmarshalTx(Iterable<IgniteTxEntry> txEntries, boolean near, GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
txEntries - Entries to unmarshal.ctx - Context.ldr - Loader.IgniteCheckedException - If failed.@Nullable protected final byte[][] marshalInvokeArguments(@Nullable Object[] args, GridCacheSharedContext ctx) throws IgniteCheckedException
args - Arguments to marshal.ctx - Context.IgniteCheckedException - If failed.@Nullable protected final Object[] unmarshalInvokeArguments(@Nullable byte[][] byteCol, GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
byteCol - Collection to unmarshal.ctx - Context.ldr - Loader.IgniteCheckedException - If failed.@Nullable protected List<byte[]> marshalCollection(@Nullable Collection<?> col, GridCacheSharedContext ctx) throws IgniteCheckedException
col - Collection to marshal.ctx - Context.IgniteCheckedException - If failed.protected final void prepareMarshalCacheObjects(@Nullable List<? extends CacheObject> col, GridCacheContext ctx) throws IgniteCheckedException
col - Collection.ctx - Cache context.IgniteCheckedException - If failed.protected final void prepareMarshalCacheObjects(@Nullable Collection<? extends CacheObject> col, GridCacheContext ctx) throws IgniteCheckedException
col - Collection.ctx - Cache context.IgniteCheckedException - If failed.protected final void finishUnmarshalCacheObjects(@Nullable List<? extends CacheObject> col, GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
col - Collection.ctx - Context.ldr - Class loader.IgniteCheckedException - If failed.protected final void finishUnmarshalCacheObjects(@Nullable Collection<? extends CacheObject> col, GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
col - Collection.ctx - Context.ldr - Class loader.IgniteCheckedException - If failed.@Nullable protected <T> List<T> unmarshalCollection(@Nullable Collection<byte[]> byteCol, GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
byteCol - Collection to unmarshal.ctx - Context.ldr - Loader.IgniteCheckedException - If failed.@Nullable protected final LinkedHashMap<byte[],Boolean> marshalBooleanLinkedMap(@Nullable LinkedHashMap<?,Boolean> map, GridCacheSharedContext ctx) throws IgniteCheckedException
map - Map to marshal.ctx - Context.IgniteCheckedException - If failed.@Nullable protected final <K1> LinkedHashMap<K1,Boolean> unmarshalBooleanLinkedMap(@Nullable Map<byte[],Boolean> byteMap, GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
byteMap - Map to unmarshal.ctx - Context.ldr - Loader.IgniteCheckedException - If failed.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015