Package com.j_spaces.jmx
Class TemplateImpl
java.lang.Object
com.j_spaces.jmx.TemplateImpl
- All Implemented Interfaces:
IGSEntry,Serializable
Implements IGSTemplate
- Since:
- 6.0
- Version:
- 1.0
- Author:
- Guyk
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEntry class Name.Entry-class codebase.Deprecated.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.
-
Constructor Details
-
TemplateImpl
public TemplateImpl() -
TemplateImpl
- Parameters:
template-typeDesc-
-
-
Method Details
-
getClassName
Description copied from interface:IGSEntryEntry class Name.- Specified by:
getClassNamein interfaceIGSEntry- Returns:
- Returns the Entry class Name.
-
getCodebase
Description copied from interface:IGSEntryEntry-class codebase.- Specified by:
getCodebasein interfaceIGSEntry- Returns:
- returns the codebase of this entry.
-
getSuperClassesNames
Description copied from interface:IGSEntryEntry Super Classes Names.- Specified by:
getSuperClassesNamesin interfaceIGSEntry- Returns:
- Returns the Entry Super Classes Names.
-
getFieldsNames
Description copied from interface:IGSEntryEntry fields names.- Specified by:
getFieldsNamesin interfaceIGSEntry- Returns:
- Returns the entry fields names.
-
getFieldsTypes
Description copied from interface:IGSEntryEntry Fields Types.- Specified by:
getFieldsTypesin interfaceIGSEntry- Returns:
- Returns The entry Fields Types
-
getIndexIndicators
public boolean[] getIndexIndicators()Description copied from interface:IGSEntryIndexed fields array indication.- Specified by:
getIndexIndicatorsin interfaceIGSEntry- Returns:
- Returns the indexed fields array indication
-
getRoutingFieldName
- Specified by:
getRoutingFieldNamein interfaceIGSEntry
-
getPrimaryKeyName
Description copied from interface:IGSEntryThe field name representing the primary key. Usually the field name of the first indexed field (can be null).- Specified by:
getPrimaryKeyNamein interfaceIGSEntry- Returns:
- field name of the primary key.
-
getFieldType
Description copied from interface:IGSEntryRetries the given field its type class name.- Specified by:
getFieldTypein interfaceIGSEntry- Parameters:
fieldName- the field name.- Returns:
- the field type class name.
-
isIndexedField
Description copied from interface:IGSEntryChecks if the given field is indexed.- Specified by:
isIndexedFieldin interfaceIGSEntry- Parameters:
fieldName- the field name.- Returns:
trueif the the field is indexed.
-
isReplicatable
public boolean isReplicatable()Description copied from interface:IGSEntryCheck if replicatable, applicable only when used with partial replication.- Specified by:
isReplicatablein interfaceIGSEntry- Returns:
trueif this entry is replicatable.
-
isBroadcast
public boolean isBroadcast()Description copied from interface:IGSEntryCheck if broadcast, applicable only when used with partial replication.- Specified by:
isBroadcastin interfaceIGSEntry- Returns:
trueif this entry is broadcast.
-
getFieldValue
public Object getFieldValue(String fieldName) throws IllegalArgumentException, IllegalStateException Description copied from interface:IGSEntryRetrieves the given field value.- Specified by:
getFieldValuein interfaceIGSEntry- 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
Description copied from interface:IGSEntryRetrieves the given field value by position.- Specified by:
getFieldValuein interfaceIGSEntry- 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
-
getFieldPosition
Description copied from interface:IGSEntryReturn the the field position in theFieldsValuesarray.- Specified by:
getFieldPositionin interfaceIGSEntry- Parameters:
fieldName- name of the field (e.g.Field.getName().- Returns:
- the field position in the field values array returned by {
IGSEntry.getFieldsValues().
-
getEntry
Deprecated.- Throws:
UnusableEntryException
-
getFieldsValues
Description copied from interface:IGSEntryEntry field Values.- Specified by:
getFieldsValuesin interfaceIGSEntry- Returns:
- Returns the entry field Values
-
getMapEntry
Description copied from interface:IGSEntryReturns a Map.Entry (key-value pair) representation of this entity. Relevant when interacting with the Space using Map API; otherwise anullis returned.- Specified by:
getMapEntryin interfaceIGSEntry- Returns:
- a Map.Entry representation of this entity;
nullif no representation. - See Also:
-
getObject
Description copied from interface:IGSEntryConverts to object.
Notice: The returned object is a transformation of this IGSEntry and each change in entry fields should be usingIGSEntry.setFieldValue(int, Object)orIGSEntry.setFieldValue(String, Object).- Specified by:
getObjectin interfaceIGSEntry- 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.
-
getTimeToLive
public long getTimeToLive()Description copied from interface:IGSEntryEntry time to live.- Specified by:
getTimeToLivein interfaceIGSEntry- Returns:
- the Entry's time to live in milliseconds.
- See Also:
-
getUID
Description copied from interface:IGSEntryEntry UID. -
getVersion
public int getVersion()Description copied from interface:IGSEntryAscending version of this Entry- Specified by:
getVersionin interfaceIGSEntry- Returns:
- the version of this entry.
-
isFifo
public boolean isFifo()Description copied from interface:IGSEntryIf true operations will be done using FIFO ordering when multiple match found. -
setFieldValue
public Object setFieldValue(String fieldName, Object value) throws IllegalArgumentException, IllegalStateException Description copied from interface:IGSEntryAssociates the specified value with the specified field.- Specified by:
setFieldValuein interfaceIGSEntry- 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
public Object setFieldValue(int position, Object value) throws IllegalArgumentException, IllegalStateException Description copied from interface:IGSEntryAssociates the specified value with the specified field position.- Specified by:
setFieldValuein interfaceIGSEntry- 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
-
isTransient
public boolean isTransient()Description copied from interface:IGSEntryChecks entry is transient even if space is persistent.- Specified by:
isTransientin interfaceIGSEntry- Returns:
trueif entry is transient
-