Package com.j_spaces.core
Interface IGSEntry
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IFilterEntry,IReplicationFilterEntry,ISpaceFilterEntry
- All Known Implementing Classes:
AbstractEntryType,BulkDataItem,CacheEntry,ChangeBulkDataItem,ChangeReplicationFilterUidDataWrapper,DiscardReplicationFilterEntryData,EntryAdapter,EntryImpl,ExecutionFilterEntry,ExternalEntry,NotificationReplicationSpaceFilterEntry,NotifyEvent,NotifyReplicationFilterEntryDataWrapper,NotifyReplicationFilterReplicaDataWrapper,NotifyReplicationFilterUidDataWrapper,PartialUpdateBulkDataItem,ReplicationFilterEntryDataWrapper,ReplicationFilterEntryReplicaDataWrapper,ReplicationFilterUidDataWrapper,SpaceAfterChangeFilterEntryImpl,SpaceBeforeChangeFilterEntryImpl,SpaceFilterEntryImpl,SpaceUpdateFilterEntryImpl,TemplateImpl
This class represents an
Entry in a GigaSpace. Each instance of
this class contains a reference to the Entry value plus any other necessary info about the entry;
including its class name, field types, and field values (could be in a MarshalledObject or MarshObject form).- Since:
- 5.0
- Version:
- 1.0
- Author:
- Guy Korland
-
Method Summary
Modifier and TypeMethodDescriptionEntry class Name.Entry-class codebase.intgetFieldPosition(String fieldName) Return the the field position in theFieldsValuesarray.String[]Entry fields names.String[]Entry Fields Types.Object[]Entry field Values.getFieldType(String fieldName) Retries the given field its type class name.getFieldValue(int position) Retrieves the given field value by position.getFieldValue(String fieldName) Retrieves the given field value.boolean[]Indexed fields array indication.Returns a Map.Entry (key-value pair) representation of this entity.Converts to object.The field name representing the primary key.String[]Entry Super Classes Names.longEntry time to live.getUID()Entry UID.intAscending version of this EntrybooleanCheck if broadcast, applicable only when used with partial replication.booleanisFifo()If true operations will be done using FIFO ordering when multiple match found.booleanisIndexedField(String fieldName) Checks if the given field is indexed.booleanCheck if replicatable, applicable only when used with partial replication.booleanChecks entry is transient even if space is persistent.setFieldValue(int position, Object value) Associates the specified value with the specified field position.setFieldValue(String fieldName, Object value) Associates the specified value with the specified field.
-
Method Details
-
getMapEntry
Map.Entry getMapEntry()Returns a Map.Entry (key-value pair) representation of this entity. Relevant when interacting with the Space using Map API; otherwise anullis returned.- Returns:
- a Map.Entry representation of this entity;
nullif no representation. - See Also:
-
getUID
String getUID()Entry UID.- Returns:
- Returns the Entry UID
-
getClassName
String getClassName()Entry class Name.- Returns:
- Returns the Entry class Name.
-
getSuperClassesNames
String[] getSuperClassesNames()Entry Super Classes Names.- Returns:
- Returns the Entry Super Classes Names.
-
getCodebase
String getCodebase()Entry-class codebase.- Returns:
- returns the codebase of this entry.
-
getFieldsNames
String[] getFieldsNames()Entry fields names.- Returns:
- Returns the entry fields names.
-
getFieldsTypes
String[] getFieldsTypes()Entry Fields Types.- Returns:
- Returns The entry Fields Types
-
getFieldsValues
Object[] getFieldsValues()Entry field Values.- Returns:
- Returns the entry field Values
-
getIndexIndicators
boolean[] getIndexIndicators()Indexed fields array indication.- Returns:
- Returns the indexed fields array indication
-
getPrimaryKeyName
String getPrimaryKeyName()The field name representing the primary key. Usually the field name of the first indexed field (can be null).- Returns:
- field name of the primary key.
-
isFifo
boolean isFifo()If true operations will be done using FIFO ordering when multiple match found.- Returns:
trueif FIFO ordering is used
-
isTransient
boolean isTransient()Checks entry is transient even if space is persistent.- Returns:
trueif entry is transient
-
isReplicatable
boolean isReplicatable()Check if replicatable, applicable only when used with partial replication.- Returns:
trueif this entry is replicatable.
-
isBroadcast
boolean isBroadcast()Check if broadcast, applicable only when used with partial replication.- Returns:
trueif this entry is broadcast.
-
getTimeToLive
long getTimeToLive()Entry time to live.- Returns:
- the Entry's time to live in milliseconds.
- See Also:
-
getVersion
int getVersion()Ascending version of this Entry- Returns:
- the version of this entry.
-
getFieldPosition
Return the the field position in theFieldsValuesarray.- Parameters:
fieldName- name of the field (e.g.Field.getName().- Returns:
- the field position in the field values array returned by {
getFieldsValues().
-
getFieldValue
Retrieves the given field value.- Parameters:
fieldName- name of the field (e.g.Field.getName().- Returns:
- the field value.
- Throws:
IllegalArgumentException- if field name is not avaliableIllegalStateException- if field values array was not properly set
-
getFieldValue
Retrieves the given field value by position.- Parameters:
position- the field position.- Returns:
- the field value.
- Throws:
IllegalArgumentException- if field name is not avaliableIllegalStateException- if field values array was not properly set
-
setFieldValue
Object setFieldValue(String fieldName, Object value) throws IllegalArgumentException, IllegalStateException Associates the specified value with the specified field.- Parameters:
fieldName- the field name.value- value to be associated with the specified field.- Returns:
- the value that was associated with the specified field.
- Throws:
IllegalArgumentException- if field name is not avaliableIllegalStateException- if field values array was not properly set
-
setFieldValue
Object setFieldValue(int position, Object value) throws IllegalArgumentException, IllegalStateException Associates the specified value with the specified field position.- Parameters:
position- the field position.value- value to be associated with the specified field.- Returns:
- the value that was associated with the specified field.
- Throws:
IllegalArgumentException- if field name is not avaliableIllegalStateException- if field values array was not properly set
-
getFieldType
Retries the given field its type class name.- Parameters:
fieldName- the field name.- Returns:
- the field type class name.
- Throws:
IllegalArgumentException- if field name is not avaliableIllegalStateException- if field types array was not properly set
-
isIndexedField
Checks if the given field is indexed.- Parameters:
fieldName- the field name.- Returns:
trueif the the field is indexed.- Throws:
IllegalArgumentException- if field name is not avaliableIllegalStateException- if field indexes array was not properly set
-
getObject
Converts to object.
Notice: The returned object is a transformation of this IGSEntry and each change in entry fields should be usingsetFieldValue(int, Object)orsetFieldValue(String, Object).- Parameters:
space- Space proxy.- Returns:
- Returns converted Object.
- Throws:
UnusableEntryException- One or more fields in the entry cannot be deserialized, or the class for the entry type itself cannot be deserialized.
-
getRoutingFieldName
String getRoutingFieldName()
-