Class GridDhtAtomicAbstractUpdateRequest

    • Field Detail

      • DHT_ATOMIC_SKIP_STORE_FLAG_MASK

        protected static final int DHT_ATOMIC_SKIP_STORE_FLAG_MASK
        Skip store flag bit mask.
        See Also:
        Constant Field Values
      • DHT_ATOMIC_KEEP_BINARY_FLAG_MASK

        protected static final int DHT_ATOMIC_KEEP_BINARY_FLAG_MASK
        Keep binary flag.
        See Also:
        Constant Field Values
      • DHT_ATOMIC_NEAR_FLAG_MASK

        protected static final int DHT_ATOMIC_NEAR_FLAG_MASK
        Near cache key flag.
        See Also:
        Constant Field Values
      • DHT_ATOMIC_OBSOLETE_NEAR_KEY_FLAG_MASK

        protected static final int DHT_ATOMIC_OBSOLETE_NEAR_KEY_FLAG_MASK
        See Also:
        Constant Field Values
      • DHT_ATOMIC_TRANSFORM_OP_FLAG_MASK

        protected static final int DHT_ATOMIC_TRANSFORM_OP_FLAG_MASK
        Flag indicating transformation operation was performed.
        See Also:
        Constant Field Values
      • DHT_ATOMIC_READ_REPAIR_RECOVERY_FLAG_MASK

        protected static final int DHT_ATOMIC_READ_REPAIR_RECOVERY_FLAG_MASK
        Flag indicating recovery on read repair.
        See Also:
        Constant Field Values
      • CACHE_MSG_IDX

        public static final int CACHE_MSG_IDX
        Message index.
      • futId

        protected long futId
        Future ID on primary.
      • taskNameHash

        protected int taskNameHash
        Task name hash.
      • nodeId

        protected UUID nodeId
        Node ID.
      • flags

        protected byte flags
        Additional flags.
    • Constructor Detail

      • GridDhtAtomicAbstractUpdateRequest

        protected GridDhtAtomicAbstractUpdateRequest()
        Empty constructor required by Externalizable.
      • GridDhtAtomicAbstractUpdateRequest

        protected GridDhtAtomicAbstractUpdateRequest​(int cacheId,
                                                     UUID nodeId,
                                                     long futId,
                                                     GridCacheVersion writeVer,
                                                     CacheWriteSynchronizationMode syncMode,
                                                     @NotNull
                                                     @NotNull AffinityTopologyVersion topVer,
                                                     int taskNameHash,
                                                     boolean addDepInfo,
                                                     boolean keepBinary,
                                                     boolean skipStore,
                                                     boolean readRepairRecovery)
        Constructor.
        Parameters:
        cacheId - Cache ID.
        nodeId - Node ID.
    • Method Detail

      • nearNodeId

        public UUID nearNodeId()
        Returns:
        Near node ID.
      • nodeId

        public UUID nodeId()
        Returns:
        Node ID.
      • flags

        public final byte flags()
        Returns:
        Flags.
      • keepBinary

        public final boolean keepBinary()
        Returns:
        Keep binary flag.
      • readRepairRecovery

        public final boolean readRepairRecovery()
        Returns:
        Recovery on Read Repair flag.
      • skipStore

        public final boolean skipStore()
        Returns:
        Skip write-through to a persistent storage.
      • transformOperation

        public final boolean transformOperation()
        Returns:
        True if transformation operation was performed.
      • onResponse

        public boolean onResponse()
        Returns:
        True if on response flag changed.
      • addDeploymentInfo

        public boolean addDeploymentInfo()
        Deployment enabled flag indicates whether deployment info has to be added to this message.
        Specified by:
        addDeploymentInfo in class GridCacheMessage
        Returns:
        true or if deployment info must be added to the the message, false otherwise.
      • forceTransformBackups

        public abstract boolean forceTransformBackups()
        Returns:
        Force transform backups flag.
      • addWriteValue

        public abstract void addWriteValue​(KeyCacheObject key,
                                           @Nullable
                                           @Nullable CacheObject val,
                                           javax.cache.processor.EntryProcessor<Object,​Object,​Object> entryProcessor,
                                           long ttl,
                                           long conflictExpireTime,
                                           @Nullable
                                           @Nullable GridCacheVersion conflictVer,
                                           boolean addPrevVal,
                                           @Nullable
                                           @Nullable CacheObject prevVal,
                                           long updateCntr,
                                           GridCacheOperation cacheOp)
        Parameters:
        key - Key to add.
        val - Value, null if should be removed.
        entryProcessor - Entry processor.
        ttl - TTL (optional).
        conflictExpireTime - Conflict expire time (optional).
        conflictVer - Conflict version (optional).
        addPrevVal - If true adds previous value.
        prevVal - Previous value.
        updateCntr - Update counter.
        cacheOp - Corresponding cache operation.
      • addNearWriteValue

        public abstract void addNearWriteValue​(KeyCacheObject key,
                                               @Nullable
                                               @Nullable CacheObject val,
                                               javax.cache.processor.EntryProcessor<Object,​Object,​Object> entryProcessor,
                                               long ttl,
                                               long expireTime)
        Parameters:
        key - Key to add.
        val - Value, null if should be removed.
        entryProcessor - Entry processor.
        ttl - TTL.
        expireTime - Expire time.
      • cleanup

        protected abstract void cleanup()
        Cleanup values not needed after message was sent.
      • taskNameHash

        public final int taskNameHash()
        Returns:
        Task name.
      • futureId

        public final long futureId()
        Returns:
        Future ID on primary node.
      • nearFutureId

        public final long nearFutureId()
        Returns:
        Future ID on near node.
      • writeVersion

        public final GridCacheVersion writeVersion()
        Returns:
        Write version.
      • size

        public abstract int size()
        Returns:
        Keys size.
      • nearSize

        public abstract int nearSize()
        Returns:
        Keys size.
      • hasKey

        public abstract boolean hasKey​(KeyCacheObject key)
        Parameters:
        key - Key to check.
        Returns:
        true if request keys contain key.
      • key

        public abstract KeyCacheObject key​(int idx)
        Parameters:
        idx - Key index.
        Returns:
        Key.
      • obsoleteNearKeysSize

        public abstract int obsoleteNearKeysSize()
        Returns:
        Obsolete near cache keys size.
      • obsoleteNearKey

        public abstract KeyCacheObject obsoleteNearKey​(int idx)
        Parameters:
        idx - Obsolete near cache key index.
        Returns:
        Obsolete near cache key.
      • updateCounter

        public abstract Long updateCounter​(int updCntr)
        Parameters:
        updCntr - Update counter.
        Returns:
        Update counter.
      • nearKey

        public abstract KeyCacheObject nearKey​(int idx)
        Parameters:
        idx - Near key index.
        Returns:
        Key.
      • value

        @Nullable
        public abstract @Nullable CacheObject value​(int idx)
        Parameters:
        idx - Key index.
        Returns:
        Value.
      • previousValue

        @Nullable
        public abstract @Nullable CacheObject previousValue​(int idx)
        Parameters:
        idx - Key index.
        Returns:
        Value.
      • entryProcessor

        @Nullable
        public abstract @Nullable javax.cache.processor.EntryProcessor<Object,​Object,​Object> entryProcessor​(int idx)
        Parameters:
        idx - Key index.
        Returns:
        Entry processor.
      • nearValue

        @Nullable
        public abstract @Nullable CacheObject nearValue​(int idx)
        Parameters:
        idx - Near key index.
        Returns:
        Value.
      • nearEntryProcessor

        @Nullable
        public abstract @Nullable javax.cache.processor.EntryProcessor<Object,​Object,​Object> nearEntryProcessor​(int idx)
        Parameters:
        idx - Key index.
        Returns:
        Transform closure.
      • conflictVersion

        @Nullable
        public abstract @Nullable GridCacheVersion conflictVersion​(int idx)
        Parameters:
        idx - Index.
        Returns:
        Conflict version.
      • ttl

        public abstract long ttl​(int idx)
        Parameters:
        idx - Index.
        Returns:
        TTL.
      • nearTtl

        public abstract long nearTtl​(int idx)
        Parameters:
        idx - Index.
        Returns:
        TTL for near cache update.
      • conflictExpireTime

        public abstract long conflictExpireTime​(int idx)
        Parameters:
        idx - Index.
        Returns:
        Conflict expire time.
      • nearExpireTime

        public abstract long nearExpireTime​(int idx)
        Parameters:
        idx - Index.
        Returns:
        Expire time for near cache update.
      • invokeArguments

        @Nullable
        public abstract @Nullable Object[] invokeArguments()
        Returns:
        Optional arguments for entry processor.
      • setFlag

        protected final void setFlag​(boolean flag,
                                     int mask)
        Sets flag mask.
        Parameters:
        flag - Set or clear.
        mask - Mask.