GigaSpaces XAP 9.7.2 API

com.j_spaces.core
Interface IGSEntry

All Superinterfaces:
Serializable
All Known Subinterfaces:
IFilterEntry, IReplicationFilterEntry, ISpaceFilterEntry
All Known Implementing Classes:
ExternalEntry

public interface IGSEntry
extends Serializable

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
 String getClassName()
          Entry class Name.
 String getCodebase()
          Entry-class codebase.
 int getFieldPosition(String fieldName)
          Return the the field position in the FieldsValues array.
 String[] getFieldsNames()
          Entry fields names.
 String[] getFieldsTypes()
          Entry Fields Types.
 Object[] getFieldsValues()
          Entry field Values.
 String getFieldType(String fieldName)
          Retries the given field its type class name.
 Object getFieldValue(int position)
          Retrieves the given field value by position.
 Object getFieldValue(String fieldName)
          Retrieves the given field value.
 boolean[] getIndexIndicators()
          Indexed fields array indication.
 Map.Entry getMapEntry()
          Returns a Map.Entry (key-value pair) representation of this entity.
 Object getObject(IJSpace space)
          Converts to object.
 String getPrimaryKeyName()
          The field name representing the primary key.
 String getRoutingFieldName()
           
 String[] getSuperClassesNames()
          Entry Super Classes Names.
 long getTimeToLive()
          Entry time to live.
 String getUID()
          Entry UID.
 int getVersion()
          Ascending version of this Entry
 boolean isFifo()
          If true operations will be done using FIFO ordering when multiple match found.
 boolean isIndexedField(String fieldName)
          Checks if the given field is indexed.
 boolean isReplicatable()
          Check if replicatable, applicable only when used with partial replication.
 boolean isTransient()
          Checks entry is transient even if space is persistent.
 Object setFieldValue(int position, Object value)
          Associates the specified value with the specified field position.
 Object setFieldValue(String fieldName, Object value)
          Associates the specified value with the specified field.
 

Method Detail

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 a null is returned.

Returns:
a Map.Entry representation of this entity; null if no representation.
See Also:
Map.Entry

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:
true if FIFO ordering is used

isTransient

boolean isTransient()
Checks entry is transient even if space is persistent.

Returns:
true if entry is transient

isReplicatable

boolean isReplicatable()
Check if replicatable, applicable only when used with partial replication.

Returns:
true if this entry is replicatable.
See Also:
IReplicatable

getTimeToLive

long getTimeToLive()
Entry time to live.

Returns:
the Entry's time to live in milliseconds.
See Also:
Lease

getVersion

int getVersion()
Ascending version of this Entry

Returns:
the version of this entry.

getFieldPosition

int getFieldPosition(String fieldName)
Return the the field position in the FieldsValues array.

Parameters:
fieldName - name of the field (e.g. Field.getName().
Returns:
the field position in the field values array returned by {getFieldsValues().

getFieldValue

Object getFieldValue(String fieldName)
                     throws IllegalArgumentException,
                            IllegalStateException
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 avaliable
IllegalStateException - if field values array was not properly set

getFieldValue

Object getFieldValue(int position)
                     throws IllegalArgumentException,
                            IllegalStateException
Retrieves the given field value by position.

Parameters:
position - the field position.
Returns:
the field value.
Throws:
IllegalArgumentException - if field name is not avaliable
IllegalStateException - 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 avaliable
IllegalStateException - 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 avaliable
IllegalStateException - if field values array was not properly set

getFieldType

String getFieldType(String fieldName)
                    throws IllegalArgumentException,
                           IllegalStateException
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 avaliable
IllegalStateException - if field types array was not properly set

isIndexedField

boolean isIndexedField(String fieldName)
                       throws IllegalArgumentException,
                              IllegalStateException
Checks if the given field is indexed.

Parameters:
fieldName - the field name.
Returns:
true if the the field is indexed.
Throws:
IllegalArgumentException - if field name is not avaliable
IllegalStateException - if field indexes array was not properly set

getObject

Object getObject(IJSpace space)
                 throws UnusableEntryException
Converts to object.
Notice: The returned object is a transformation of this IGSEntry and each change in entry fields should be using setFieldValue(int, Object) or setFieldValue(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()

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.