Class InvocableMapHelper.RoutingBinaryEntry

    • Constructor Detail

      • RoutingBinaryEntry

        protected RoutingBinaryEntry​(BinaryEntry entry)
        Construct a routing entry.
        Parameters:
        entry - the underlying BinaryEntry
    • Method Detail

      • getBinaryKey

        public Binary getBinaryKey()
        Return a raw binary key for this entry.
        Specified by:
        getBinaryKey in interface BinaryEntry
        Returns:
        a raw binary key for this entry
      • getBinaryValue

        public Binary getBinaryValue()
        Return an OriginalBinaryValue from the underlying entry.
        Specified by:
        getBinaryValue in interface BinaryEntry
        Returns:
        a raw binary value for this entry; null if the value does not exist
      • isReadOnly

        public boolean isReadOnly()
        Check whether this BinaryEntry allows data modification operations.
        Specified by:
        isReadOnly in interface BinaryEntry
        Returns:
        true iff the entry is "read-only"
      • updateBinaryValue

        public void updateBinaryValue​(Binary binValue)
        Description copied from interface: BinaryEntry
        Update the binary value for this entry.

        Passing a non-null binary is functionally equivalent to:

           setValue(getContext().getValueFromInternalConverter().convert(binValue));
         
        Passing null value is functionally equivalent to removing the entry.
           remove(false);
         

        Specified by:
        updateBinaryValue in interface BinaryEntry
        Parameters:
        binValue - new binary value to be stored in this entry or null
        Throws:
        UnsupportedOperationException
      • updateBinaryValue

        public void updateBinaryValue​(Binary binValue,
                                      boolean fSynthetic)
        Description copied from interface: BinaryEntry
        Update the binary value for this entry.

        Passing a non-null binary is functionally equivalent to:

           setValue(getContext().getValueFromInternalConverter().convert(binValue));
         
        Passing null value is functionally equivalent to removing the entry.
           remove(false);
         
        This method will bypass any CacheStore or BinaryEntryStore implementations, iff fSynthetic is true and the backing map associated with this entry is a ReadWriteBackingMap.

        Specified by:
        updateBinaryValue in interface BinaryEntry
        Parameters:
        binValue - new binary value to be stored in this entry or null
        fSynthetic - pass true only if the insertion into or modification of the Map should be treated as a synthetic event
        Throws:
        UnsupportedOperationException
      • getBackingMap

        public ObservableMap getBackingMap()
        Description copied from interface: BinaryEntry
        Obtain a reference to the backing map that this Entry corresponds to. The returned Map should be used in a read-only manner.

        Note: This method is a shortcut for the getBackingMapContext().getBackingMap() call. As of Coherence 3.7, the returned type has been narrowed to ObservableMap.

        Specified by:
        getBackingMap in interface BinaryEntry
        Returns:
        the backing map reference; null if the entry does not have any backing map association
        Throws:
        UnsupportedOperationException
      • expire

        public void expire​(long cMillis)
        Description copied from interface: BinaryEntry
        Update the entry with the specified expiry delay.

        Note: this method only has an effect only if the associated backing map implements the CacheMap interface

        Specified by:
        expire in interface BinaryEntry
        Parameters:
        cMillis - the number of milliseconds until the entry will expire; pass CacheMap.EXPIRY_DEFAULT to use the default expiry setting; pass CacheMap.EXPIRY_NEVER to indicate that the entry should never expire
        Throws:
        UnsupportedOperationException
      • getExpiry

        public long getExpiry()
        Description copied from interface: BinaryEntry
        Return the number of milliseconds remaining before the specified entry is scheduled to expire. If the BinaryEntry.expire(long) method has been called, the returned value will reflect the requested expiry delay. Otherwise if the entry exists, the returned value will represent the time remaining until the entry expires (or CacheMap.EXPIRY_NEVER if the entry will never expire). If the entry does not exist, CacheMap.EXPIRY_DEFAULT will be returned.

        This method will make a "best effort" attempt to determine the expiry time remaining. In some cases, it may not be possible to determine the expiry (e.g. the backing-map does not implement the CacheMap interface), in which case CacheMap.EXPIRY_DEFAULT will be returned.

        Specified by:
        getExpiry in interface BinaryEntry
        Returns:
        the number of milliseconds remaining before the specified entry expires
        Throws:
        UnsupportedOperationException