|
GigaSpaces XAP 7.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j_spaces.core.client.ExternalEntry
com.j_spaces.map.Envelope
public class Envelope
This class holds key, value and Attributes
that are associated with the key.
key is user-defined object that refers to the
value. keys are assumed to be unique.
For internal use only!
| Field Summary | |
|---|---|
static int |
CACHE_ID
the cache id index in the values array. |
static String |
ENVELOPE_CLASS_NAME
this constant using for build entry UID using ClientUIDHandler. |
static int |
KEY
the key index in the values array. |
static int |
VALUE
the value index in the values array. |
| Fields inherited from class com.j_spaces.core.client.ExternalEntry |
|---|
_objectFormat, _primitiveFields, _returnTrueType, m_ClassName, m_ExtendedMatchCodes, m_FieldsNames, m_FieldsTypes, m_FieldsValues, m_IndexIndicators, m_isFifo, m_isTransient, m_MultipleUIDs, m_NOWriteLeaseMode, m_PrimaryKeyName, m_RangeValues, m_RangeValuesInclusion, m_Replicatable, m_ReturnOnlyUids, m_SuperClassesNames, m_TimeToLive, m_UID, m_VersionID, routingFieldName |
| Constructor Summary | |
|---|---|
Envelope()
default constructor - used for snapshot and notify. |
|
Envelope(Object key,
Object value)
Constructor with key and its value. |
|
Envelope(Object key,
Object value,
String cacheID)
Constructor with key and its value. |
|
Envelope(String uid,
Object key)
Constructor with uid and key. |
|
| Method Summary | |
|---|---|
static String |
getCacheID(ExternalEntry envelope)
Extracts the CacheId from an Envelope. |
Object |
getKey()
|
static Object |
getKey(ExternalEntry envelope)
Extracts the key from an Envelope. |
Map.Entry |
getMapEntry()
Returns a Map.Entry (key-value pair) representation of this entity. Relevant when interacting with the Space using Map API; otherwise a null is returned. |
Object |
getValue()
|
static Object |
getValue(ExternalEntry envelope)
Extracts the value from an Envelope. |
Object |
setKey(Object newKey)
|
Object |
setValue(Object newValue)
|
String |
toString()
Returns a string representation of the Envelope. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map.Entry |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final int KEY
public static final int VALUE
public static final int CACHE_ID
public static final String ENVELOPE_CLASS_NAME
| Constructor Detail |
|---|
public Envelope()
public Envelope(Object key,
Object value,
String cacheID)
key and its value.
key - user-defined object that refers to the valuevalue - value that is associated with the keycacheID - cache unique uid
public Envelope(String uid,
Object key)
uid and key.
uid - space uid that representskey - user-defined object that refers to the value
public Envelope(Object key,
Object value)
key and its value.
key - user-defined object that refers to the valuevalue - value that is associated with the key| Method Detail |
|---|
public String toString()
Envelope.
This method returns a string equal to the
value of:
"key: " + key + " value: " + value
toString in class ExternalEntrypublic static Object getKey(ExternalEntry envelope)
envelope - the envelope that holds the key
Envelope keypublic static Object getValue(ExternalEntry envelope)
envelope - the envelope that holds the value
Envelope valuepublic static String getCacheID(ExternalEntry envelope)
envelope - the envelope that holds the CacheID
public Map.Entry getMapEntry()
null is returned.
getMapEntry in interface IGSEntrygetMapEntry in class ExternalEntrynull if no representation.Map.Entrypublic Object getKey()
getKey in interface Map.Entrypublic Object setKey(Object newKey)
public Object getValue()
getValue in interface Map.Entrypublic Object setValue(Object newValue)
setValue in interface Map.Entry
|
GigaSpaces XAP 7.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||