Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class InvocableMapHelper.RoutingBinaryEntry

java.lang.Object
  extended by com.tangosol.util.InvocableMapHelper.RoutingMapTriggerEntry
      extended by com.tangosol.util.InvocableMapHelper.RoutingBinaryEntry

All Implemented Interfaces:
BinaryEntry, InvocableMap.Entry, MapTrigger.Entry, QueryMap.Entry, java.util.Map.Entry
Enclosing class:
InvocableMapHelper

protected static class InvocableMapHelper.RoutingBinaryEntry
extends InvocableMapHelper.RoutingMapTriggerEntry
implements BinaryEntry

BinaryEntry wrapper that routes the getValue()/getBinaryValue() calls onto getOriginalValue()/getOriginalBinaryValue().


Field Summary

 

Fields inherited from class com.tangosol.util.InvocableMapHelper.RoutingMapTriggerEntry
m_entry

 

Constructor Summary
protected InvocableMapHelper.RoutingBinaryEntry(BinaryEntry entry)
          Construct a routing entry.

 

Method Summary
 void expire(long cMillis)
          Update the entry with the specified expiry delay.
 ObservableMap getBackingMap()
          Obtain a reference to the backing map that this Entry corresponds to.
 BackingMapContext getBackingMapContext()
          Obtain a reference to the backing map context for the cache that this Entry corresponds to.
 Binary getBinaryKey()
          Return a raw binary key for this entry.
 Binary getBinaryValue()
          Return an OriginalBinaryValue from the underlying entry.
 BackingMapManagerContext getContext()
          Return the context this entry operates within.
 Binary getOriginalBinaryValue()
          Return a raw original binary value for this entry.
 Serializer getSerializer()
          Return a Serializer that is used to serialize/deserialize this entry.
 boolean isReadOnly()
          Check whether this BinaryEntry allows data modification operations.
 void updateBinaryValue(Binary binValue)
          Update the binary value for this entry.
 void updateBinaryValue(Binary binValue, boolean fSynthetic)
          Update the binary value for this entry.

 

Methods inherited from class com.tangosol.util.InvocableMapHelper.RoutingMapTriggerEntry
extract, getKey, getOriginalValue, getValue, isOriginalPresent, isPresent, remove, setValue, setValue, update

 

Methods inherited from interface com.tangosol.util.BinaryEntry
getOriginalValue, remove, setValue

 

Methods inherited from interface com.tangosol.util.InvocableMap.Entry
getKey, getValue, isPresent, setValue, update

 

Methods inherited from interface com.tangosol.util.QueryMap.Entry
extract

 

Methods inherited from interface java.util.Map.Entry
equals, hashCode

 

Constructor Detail

InvocableMapHelper.RoutingBinaryEntry

protected InvocableMapHelper.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

getSerializer

public Serializer getSerializer()
Return a Serializer that is used to serialize/deserialize this entry.
Specified by:
getSerializer in interface BinaryEntry
Returns:
a Serializer that is used to serialize/deserialize this entry

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"

getContext

public BackingMapManagerContext getContext()
Description copied from interface: BinaryEntry
Return the context this entry operates within.

Note: This method is a shortcut for the getBackingMapContext.getManagerContext() call.

Specified by:
getContext in interface BinaryEntry
Returns:
the BackingMapManagerContext for this entry
Throws:
java.lang.UnsupportedOperationException

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:
java.lang.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 BackingMap 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:
java.lang.UnsupportedOperationException

getOriginalBinaryValue

public Binary getOriginalBinaryValue()
Description copied from interface: BinaryEntry
Return a raw original binary value for this entry.
Specified by:
getOriginalBinaryValue in interface BinaryEntry
Returns:
a raw original binary value for this entry; null if the original value did not exist
Throws:
java.lang.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:
java.lang.UnsupportedOperationException

getBackingMapContext

public BackingMapContext getBackingMapContext()
Description copied from interface: BinaryEntry
Obtain a reference to the backing map context for the cache that this Entry corresponds to.
Specified by:
getBackingMapContext in interface BinaryEntry
Returns:
the corresponding BackingMapContext; null if the entry does not have any backing map association
Throws:
java.lang.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:
java.lang.UnsupportedOperationException

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.