|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.core.client.ExternalEntry com.j_spaces.map.Envelope
public class Envelope
This class holds key
, value
and Attribute
s
that are associated with the key.
key
is user-defined object that refers to the
value
. key
s 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 value
value
- value that is associated with the key
cacheID
- cache unique uidpublic 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 value
value
- 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 ExternalEntry
public 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 IGSEntry
getMapEntry
in class ExternalEntry
null
if no representation.Map.Entry
public Object getKey()
getKey
in interface Map.Entry
public Object setKey(Object newKey)
public Object getValue()
getValue
in interface Map.Entry
public 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 |