Class GridNearLockResponse
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse
-
- org.apache.ignite.internal.processors.cache.distributed.near.GridNearLockResponse
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,GridCacheVersionable,Message
public class GridNearLockResponse extends GridDistributedLockResponse
Near cache lock response.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
ver
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheId
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description GridNearLockResponse()Empty constructor (required byExternalizable).GridNearLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, int miniId, boolean filterRes, int cnt, Throwable err, AffinityTopologyVersion clientRemapVer, boolean addDepInfo, boolean compatibleRemapVer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValueBytes(@Nullable CacheObject val, boolean filterPassed, @Nullable GridCacheVersion dhtVer, @Nullable GridCacheVersion mappedVer)@Nullable AffinityTopologyVersionclientRemapVersion()booleancompatibleRemapVersion()GridCacheVersiondhtVersion(int idx)shortdirectType()Gets message type.bytefieldsCount()Gets fields count.booleanfilterResult(int idx)Gets filter evaluation result for fast-commit transaction.GridCacheVersionmappedVersion(int idx)Returns DHT candidate version for acquired near lock on DHT node.intminiId()Collection<GridCacheVersion>pending()Gets pending versions that are less thanGridDistributedBaseMessage.version().voidpending(Collection<GridCacheVersion> pending)Sets pending versions that are less thanGridDistributedBaseMessage.version().booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.StringtoString()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedLockResponse
addValue, error, error, finishUnmarshal, futureId, messageLogger, prepareMarshal, value, valuesSize
-
Methods inherited from class org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
addDeploymentInfo, committedVersions, completedVersions, rolledbackVersions, version, version
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheGroupMessage, cacheId, cacheId, handlerId
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, topologyVersion, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheDeployable
deployInfo, prepare
-
-
-
-
Constructor Detail
-
GridNearLockResponse
public GridNearLockResponse()
Empty constructor (required byExternalizable).
-
GridNearLockResponse
public GridNearLockResponse(int cacheId, GridCacheVersion lockVer, IgniteUuid futId, int miniId, boolean filterRes, int cnt, Throwable err, AffinityTopologyVersion clientRemapVer, boolean addDepInfo, boolean compatibleRemapVer)- Parameters:
cacheId- Cache ID.lockVer- Lock ID.futId- Future ID.miniId- Mini future ID.filterRes-Trueif need to allocate array for filter evaluation results.cnt- Count.err- Error.clientRemapVer-Trueif client node should remap lock request. IfcompatibleRemapVeristruewhen first request is not remapped, but all subsequent will use remap version.addDepInfo- Deployment info.compatibleRemapVer-Trueif remap version is compatible with lock version.
-
-
Method Detail
-
clientRemapVersion
@Nullable public @Nullable AffinityTopologyVersion clientRemapVersion()
- Returns:
Trueif client node should remap lock request.
-
compatibleRemapVersion
public boolean compatibleRemapVersion()
- Returns:
Trueis remap version is compatible with current topology version.
-
pending
public Collection<GridCacheVersion> pending()
Gets pending versions that are less thanGridDistributedBaseMessage.version().- Returns:
- Pending versions.
-
pending
public void pending(Collection<GridCacheVersion> pending)
Sets pending versions that are less thanGridDistributedBaseMessage.version().- Parameters:
pending- Pending versions.
-
miniId
public int miniId()
- Returns:
- Mini future ID.
-
dhtVersion
public GridCacheVersion dhtVersion(int idx)
- Parameters:
idx- Index.- Returns:
- DHT version.
-
mappedVersion
public GridCacheVersion mappedVersion(int idx)
Returns DHT candidate version for acquired near lock on DHT node.- Parameters:
idx- Key index.- Returns:
- DHT version.
-
filterResult
public boolean filterResult(int idx)
Gets filter evaluation result for fast-commit transaction.- Parameters:
idx- Result index.- Returns:
Trueif filter passed on primary node,falseotherwise.
-
addValueBytes
public void addValueBytes(@Nullable @Nullable CacheObject val, boolean filterPassed, @Nullable @Nullable GridCacheVersion dhtVer, @Nullable @Nullable GridCacheVersion mappedVer) throws IgniteCheckedException- Parameters:
val- Value.filterPassed- Boolean flag indicating whether filter passed for fast-commit transaction.dhtVer- DHT version.mappedVer- Mapped version.- Throws:
IgniteCheckedException- If failed.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridDistributedLockResponse- Parameters:
buf- Byte buffer.writer- Writer.- Returns:
- Whether message was fully written.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.- Specified by:
readFromin interfaceMessage- Overrides:
readFromin classGridDistributedLockResponse- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Overrides:
directTypein classGridDistributedLockResponse- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridDistributedLockResponse- Returns:
- Fields count.
-
toString
public String toString()
- Overrides:
toStringin classGridDistributedLockResponse
-
-