use of org.apache.ignite.internal.processors.cache.distributed.IgniteExternalizableExpiryPolicy in project ignite by apache.
the class GridNearAtomicFullUpdateRequest method prepareMarshal.
/** {@inheritDoc} */
@Override
public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
super.prepareMarshal(ctx);
GridCacheContext cctx = ctx.cacheContext(cacheId);
if (expiryPlc != null && expiryPlcBytes == null)
expiryPlcBytes = CU.marshal(cctx, new IgniteExternalizableExpiryPolicy(expiryPlc));
prepareMarshalCacheObjects(keys, cctx);
if (filter != null) {
boolean hasFilter = false;
for (CacheEntryPredicate p : filter) {
if (p != null) {
hasFilter = true;
p.prepareMarshal(cctx);
}
}
if (!hasFilter)
filter = null;
}
if (op == TRANSFORM) {
// force addition of deployment info for entry processors if P2P is enabled globally.
if (!addDepInfo && ctx.deploymentEnabled())
addDepInfo = true;
if (entryProcessorsBytes == null)
entryProcessorsBytes = marshalCollection(entryProcessors, cctx);
if (invokeArgsBytes == null)
invokeArgsBytes = marshalInvokeArguments(invokeArgs, cctx);
} else
prepareMarshalCacheObjects(vals, cctx);
}
use of org.apache.ignite.internal.processors.cache.distributed.IgniteExternalizableExpiryPolicy in project ignite by apache.
the class IgniteTxEntry method marshal.
/**
* @param ctx Context.
* @param transferExpiry {@code True} if expire policy should be marshalled.
* @throws IgniteCheckedException If failed.
*/
public void marshal(GridCacheSharedContext<?, ?> ctx, boolean transferExpiry) throws IgniteCheckedException {
if (filters != null) {
for (CacheEntryPredicate p : filters) {
if (p != null)
p.prepareMarshal(this.ctx);
}
}
// Do not serialize filters if they are null.
if (transformClosBytes == null && entryProcessorsCol != null)
transformClosBytes = CU.marshal(this.ctx, entryProcessorsCol);
if (transferExpiry)
transferExpiryPlc = expiryPlc != null && expiryPlc != this.ctx.expiry();
key.prepareMarshal(context().cacheObjectContext());
val.marshal(context());
if (transferExpiryPlc) {
if (expiryPlcBytes == null)
expiryPlcBytes = CU.marshal(this.ctx, new IgniteExternalizableExpiryPolicy(expiryPlc));
} else
expiryPlcBytes = null;
}
Aggregations