@Deprecated public class ExternalEntry extends Object implements Entry, IGSEntry, Cloneable
Modifier and Type | Field and Description |
---|---|
boolean[] |
_primitiveFields
Deprecated.
|
boolean |
_returnTrueType
Deprecated.
|
String |
m_ClassName
Deprecated.
The Entry class name.
|
short[] |
m_ExtendedMatchCodes
Deprecated.
Codes for extending matching.
|
String[] |
m_FieldsNames
Deprecated.
The Entry field names array.
|
String[] |
m_FieldsTypes
Deprecated.
The Entry field Types.
|
Object[] |
m_FieldsValues
Deprecated.
The Entry field values.
|
boolean[] |
m_IndexIndicators
Deprecated.
Contains array of boolean values that indicate which of the class fields are index fields.
|
boolean |
m_isFifo
Deprecated.
FIFO Indication, if
true the entry will be returned in a FIFO way. |
boolean |
m_isTransient
Deprecated.
If
true will be transient. |
String[] |
m_MultipleUIDs
Deprecated.
Contains array of UIDs.
|
boolean |
m_NOWriteLeaseMode
Deprecated.
If true Lease object would not return from the write/writeMultiple operations.
|
String |
m_PrimaryKeyName
Deprecated.
The field name representing the primary key.
|
Object[] |
m_RangeValues
Deprecated.
range values- correspond to m_ExtendedMatchCodes, this is UP-TO and include values.
|
boolean[] |
m_RangeValuesInclusion
Deprecated.
boolean array that indicates for each range value if it is included in range or not
|
boolean |
m_Replicatable
Deprecated.
Contains a tag that indicates whether the class should be replicated or not.
|
boolean |
m_ReturnOnlyUids
Deprecated.
If true readMultiple/takeMultiple return only UIDs.
|
String[] |
m_SuperClassesNames
Deprecated.
The Entry super classes names array.
|
long |
m_TimeToLive
Deprecated.
Read only field.
|
String |
m_UID
Deprecated.
Store Entry Unique ID.
|
int |
m_VersionID
Deprecated.
Contains a version number that is incremented each time the entry is updated.
|
String |
routingFieldName
Deprecated.
The field name representing routing field name.
|
Modifier | Constructor and Description |
---|---|
|
ExternalEntry()
Deprecated.
Default constructor required for
java.io.Externalizable interface. |
protected |
ExternalEntry(ExternalEntry entry)
Deprecated.
Copy constructor, creates a copy of this entry.
|
|
ExternalEntry(String entryUID)
Deprecated.
Constructs an ExternalEntry object that will be used as a template.
|
|
ExternalEntry(String[] multipleUIDs)
Deprecated.
Constructs an ExternalEntry object that will be used as a template for
readMultiple/takeMultiple operations.
You can read/take multiple Entries from the space using their UID's in one space operation. |
|
ExternalEntry(String className,
Object[] fieldsValues)
Deprecated.
Constructs an ExternalEntry object.
|
|
ExternalEntry(String className,
Object[] fieldsValues,
String[] fieldsNames)
Deprecated.
Constructs an ExternalEntry object.
|
|
ExternalEntry(String className,
Object[] fieldsValues,
String[] fieldsNames,
String[] fieldsTypes)
Deprecated.
Constructs an ExternalEntry object.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
Shallow clone
|
boolean |
equals(Object obj)
Deprecated.
Checks for identical UIDs and field values.
|
static boolean |
equals(Object o1,
Object o2)
Deprecated.
General equals method that compares two objects considering null values and multi-dimensional
arrays.
|
String |
getClassName()
Deprecated.
Entry class Name.
|
String |
getCodebase()
Deprecated.
Entry-class codebase.
|
Entry |
getEntry(IJSpace space)
Deprecated.
|
short |
getExtendedMatchCode(int index)
Deprecated.
Get extended match code at specified index
|
short[] |
getExtendedMatchCodes()
Deprecated.
Matching codes array.
|
int |
getFieldPosition(String fieldName)
Deprecated.
Return the the field position in the
FieldsValues array. |
String[] |
getFieldsNames()
Deprecated.
Entry fields names.
|
String[] |
getFieldsTypes()
Deprecated.
Entry Fields Types.
|
Object[] |
getFieldsValues()
Deprecated.
Entry field Values.
|
String |
getFieldType(String fieldName)
Deprecated.
Retries the given field its type class name.
|
Object |
getFieldValue(int index)
Deprecated.
Retrieves the given field value by position.
|
Object |
getFieldValue(String fieldName)
Deprecated.
Retrieves the given field value.
|
boolean[] |
getIndexIndicators()
Deprecated.
Indexed fields array indication.
|
Map.Entry |
getMapEntry()
Deprecated.
Returns a Map.Entry (key-value pair) representation of this entity.
|
String[] |
getMultipleUIDs()
Deprecated.
Array of Entry UIDs.
|
Object |
getObject(IJSpace space)
Deprecated.
Converts to object.
|
String |
getPrimaryKeyName()
Deprecated.
The field name representing the primary key.
|
boolean[] |
getPrimitiveFields()
Deprecated.
|
Object |
getRangeValue(int index)
Deprecated.
Get range value at specified index
|
boolean |
getRangeValueInclusion(int index)
Deprecated.
Get range value inclusion indicator at specified index
|
Object[] |
getRangeValues()
Deprecated.
Entry range Values.
|
String |
getRoutingFieldName()
Deprecated.
Get the routing field name that was selected to be the first index for partition.
|
String[] |
getSuperClassesNames()
Deprecated.
Entry Super Classes Names.
|
long |
getTimeToLive()
Deprecated.
Entry time to live.
|
String |
getUID()
Deprecated.
Entry UID.
|
int |
getVersion()
Deprecated.
Ascending version of this Entry
|
int |
getVersionID()
Deprecated.
Entry Version ID.
|
boolean |
hasExtendedInfo()
Deprecated.
|
int |
hashCode()
Deprecated.
Entry UID hashCode.
|
boolean |
isExtended()
Deprecated.
|
boolean |
isFifo()
Deprecated.
FIFO Indication.
|
boolean |
isIndexedField(String fieldName)
Deprecated.
Checks if the given field is indexed.
|
boolean |
isNOWriteLeaseMode()
Deprecated.
Check write mode.
|
boolean |
isReplicatable()
Deprecated.
Check if replicatable, applicable only when used with partial replication.
|
boolean |
isReturnOnlyUids()
Deprecated.
ReturnOnlyUids indication.
|
boolean |
isTransient()
Deprecated.
Check if Transient entry.
|
void |
makePersistent()
Deprecated.
Construct Persistent Entry.
|
void |
makeTransient()
Deprecated.
Construct Transient Entry.
|
void |
readExternal(ObjectInput in)
Deprecated.
Restore the class contents by calling the methods of DataInput for primitive types and
readObject for objects, strings and arrays.
|
void |
setClassName(String className)
Deprecated.
This method should be used for new Entry classes introduced to the space.
|
void |
setExtendedMatchCodes(short[] extendedMatchCodes)
Deprecated.
The matching codes.
|
void |
setFieldsNames(String[] fieldsNames)
Deprecated.
Set the entry field names.
|
void |
setFieldsTypes(String[] fieldsTypes)
Deprecated.
Entry fields types to set.
|
void |
setFieldsValues(Object[] fieldsValues)
Deprecated.
Entry field values to set.
|
Object |
setFieldValue(int index,
Object value)
Deprecated.
Associates the specified value with the specified field position.
|
Object |
setFieldValue(String fieldName,
Object value)
Deprecated.
Associates the specified value with the specified field.
|
void |
setFifo(boolean fifo)
Deprecated.
Set the FIFO indication.
|
void |
setIndexIndicators(boolean[] indexIndicators)
Deprecated.
indexed fields array indication to set.
|
void |
setMultipleUIDs(String[] multipleUIDs)
Deprecated.
Array of Entry UIDs to read.
|
void |
setNOWriteLeaseMode(boolean noWriteLeaseMode)
Deprecated.
Set
true do not return Lease object after write, false return Lease
object after write. |
void |
setPrimaryKeyName(String fieldName)
Deprecated.
Sets the field name representing the primary key.
|
void |
setRangeValues(Object[] rangeValues)
Deprecated.
Entry range values to set.
|
void |
setReplicatable(boolean replicatable)
Deprecated.
Set the replicatable indication value.
|
void |
setReturnOnlyUids(boolean returnOnlyUids)
Deprecated.
set the ReturnOnlyUids indication.
|
void |
setRoutingFieldName(String routingFieldName)
Deprecated.
Set the routing field name that was selected to be the first index for partition.
|
void |
setSuperClassesNames(String[] superClassesNames)
Deprecated.
set the Super Classes Names Array.
|
ExternalEntry |
setTimeToLive(long timeToLive)
Deprecated.
Set the time left for this entry to live.
|
void |
setTransient(boolean isTransient)
Deprecated.
Sets the entry to be transient (true) or persistent (false).
|
void |
setUID(String m_uid)
Deprecated.
Set Entry UID.
|
void |
setVersion(int version)
Deprecated.
|
void |
setVersionID(int versionID)
Deprecated.
Entry Version ID.
|
String |
toString()
Deprecated.
Returns a string representation of the
ExternalEntry . |
void |
writeExternal(ObjectOutput out)
Deprecated.
Save the object contents by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings, and arrays.
|
public String m_UID
Store Entry Unique ID. If this field is not null then this UID will be used by the Space, otherwise the space will generate it automatically. When entry have all its fields null (null template) and its UID is assigned, matching will be done using the UID only. The UID is a String based identifier and composed of the following parts: - Class information class Hashcode and name size - Space node name At clustered environment combined from container-name :space name. At non-clustered environment combined from dummy name. - Timestamp - Counter
public String m_ClassName
public String[] m_SuperClassesNames
public String[] m_FieldsNames
public String[] m_FieldsTypes
public Object[] m_FieldsValues
public boolean[] m_IndexIndicators
public String m_PrimaryKeyName
getPrimaryKeyName()
public boolean m_Replicatable
public String[] m_MultipleUIDs
public boolean m_ReturnOnlyUids
public boolean m_isFifo
true
the entry will be returned in a FIFO way.public int m_VersionID
public short[] m_ExtendedMatchCodes
setExtendedMatchCodes(short[])
public Object[] m_RangeValues
public boolean[] m_RangeValuesInclusion
public long m_TimeToLive
public boolean m_isTransient
true
will be transient.public boolean m_NOWriteLeaseMode
public String routingFieldName
getRoutingFieldName()
public boolean[] _primitiveFields
public boolean _returnTrueType
public ExternalEntry()
java.io.Externalizable
interface.public ExternalEntry(String entryUID)
entryUID
- entry UID.protected ExternalEntry(ExternalEntry entry)
entry
- another ExternalEntrypublic ExternalEntry(String[] multipleUIDs)
public class MyEntry extends MetaDataEntry{
public MyEntry (){}
public MyEntry (int num)
{
this.attr1 = "attr1 " + num;
this.attr2 = "attr2 " + num;
}
public String attr1,attr2;
public String toString()
{
return "UID:" + __getEntryInfo().m_UID + " attr1:" + attr1 + " attr2:"+ attr2;
}
}
The Application code:
IJSpace space = (IJSpace )SpaceFinder.find("/./mySpace");
String uid[] = new String[10];
for (int i=0; i < 10 ;i++ )
{
uid[i] = ClientUIDHandler.createUIDFromName(i , MyEntry.class.getName());
MyEntry entry = new MyEntry(i);
entry.__setEntryInfo(new EntryInfo(uid[i],0));
space.write(entry , null ,Lease.FOREVER );
}
ExternalEntry multiUIDtemplate = new ExternalEntry(uid);
Entry[] result = space.readMultiple(multiUIDtemplate , null , Integer.MAX_VALUE);
for (int i=0; i < result.length ;i++ )
{
ExternalEntry ee = (ExternalEntry)result[i];
System.out.println(ee.getEntry(space));
}
multipleUIDs
- Entries UIDs array.public ExternalEntry(String className, Object[] fieldsValues, String[] fieldsNames, String[] fieldsTypes)
className
- The entry class namefieldsValues
- The entry field values arrayfieldsNames
- The entry field names arrayfieldsTypes
- The entry field types array. Field types should be Java full class
names.public ExternalEntry(String className, Object[] fieldsValues, String[] fieldsNames)
className
- The Entry class namefieldsValues
- The Entry field values arrayfieldsNames
- The Entry field names arraypublic boolean[] getPrimitiveFields()
public boolean hasExtendedInfo()
public void writeExternal(ObjectOutput out) throws IOException
out
- the stream to write the object toIOException
- Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
in
- the stream to read data from in order to restore the objectIOException
- if I/O errors occurClassNotFoundException
- If the class for an object being restored cannot be found.public boolean equals(Object obj)
public static boolean equals(Object o1, Object o2)
public int hashCode()
public String getClassName()
getClassName
in interface IGSEntry
public void setClassName(String className)
className
- The Entry class Name to set.public short[] getExtendedMatchCodes()
public void setExtendedMatchCodes(short[] extendedMatchCodes)
extendedMatchCodes
- The matching codes to set for template objects.
This array should match the field values array. Optional Values: TemplateMatchCodes.EQ - equal TemplateMatchCodes.NE - not equal TemplateMatchCodes.GT - greater than TemplateMatchCodes.GE - grater-equal TemplateMatchCodes.LT - less than TemplateMatchCodes.LE - less-equal TemplateMatchCodes.IS_NULL - entry field is null (template field not relevant) TemplateMatchCodes.NOT_NULL - entry field is not null (template field not relevant)
public String[] getFieldsNames()
getFieldsNames
in interface IGSEntry
public void setFieldsNames(String[] fieldsNames)
fieldsNames
- The entry field namespublic String[] getFieldsTypes()
getFieldsTypes
in interface IGSEntry
public void setFieldsTypes(String[] fieldsTypes)
fieldsTypes
- The Entry fields types to set. Field types are Java classes full names.public Object[] getFieldsValues()
getFieldsValues
in interface IGSEntry
public void setFieldsValues(Object[] fieldsValues)
fieldsValues
- Entry field values to setpublic Object[] getRangeValues()
public void setRangeValues(Object[] rangeValues)
rangeValues
- Entry range values to setpublic boolean isFifo()
public void setFifo(boolean fifo)
fifo
- FIFO indication. This method should be used for new Entry Classes introduced to
the space and for templates objects used for matching.public boolean[] getIndexIndicators()
getIndexIndicators
in interface IGSEntry
public void setIndexIndicators(boolean[] indexIndicators)
indexIndicators
- Array of fields to Index. The values of this array should match the
fields arraypublic String getPrimaryKeyName()
getPrimaryKeyName
in interface IGSEntry
setPrimaryKeyName(String)
public void setPrimaryKeyName(String fieldName)
fieldName
- field name of the primary key.getPrimaryKeyName()
public String[] getMultipleUIDs()
public void setMultipleUIDs(String[] multipleUIDs)
multipleUIDs
- Array of Entry UIDs to read.public boolean isReplicatable()
isReplicatable
in interface IGSEntry
true
if this entry is replicatable.IReplicatable
public void setReplicatable(boolean replicatable)
replicatable
- The replicatable indication value. This method should be used with
clustered spaces.public boolean isReturnOnlyUids()
public void setReturnOnlyUids(boolean returnOnlyUids)
returnOnlyUids
- set the returnOnlyUids indication valuepublic String[] getSuperClassesNames()
getSuperClassesNames
in interface IGSEntry
public String getCodebase()
getCodebase
in interface IGSEntry
public void setSuperClassesNames(String[] superClassesNames)
superClassesNames
- The Super Classes Names Arraypublic long getTimeToLive()
getTimeToLive
in interface IGSEntry
Lease
public ExternalEntry setTimeToLive(long timeToLive)
timeToLive
- in millisecondspublic int getVersion()
IGSEntry
and is equivalent to calling getVersionID()
getVersion
in interface IGSEntry
getVersionID()
,
setVersionID(int)
public void setVersion(int version)
public boolean isTransient()
isTransient
in interface IGSEntry
public void setTransient(boolean isTransient)
public void makeTransient()
public void makePersistent()
public Map.Entry getMapEntry()
null
is returned.getMapEntry
in interface IGSEntry
null
if no
representation.Map.Entry
public String getUID()
public void setUID(String m_uid)
m_uid
- The Entry UID to set. When using this method make sure you are using unique
value. This method should get as input returned value from
ClientUIDHandler.createUIDFromName
The UID is a String based identifier and composed of the following parts: - Class information class Hashcode and name size - Space node name At clustered environment combined from container-name :space name. At non-clustered environment combined from dummy name. - Timestamp - Counter
public int getVersionID()
public void setVersionID(int versionID)
versionID
- The Entry Version ID to set.public void setNOWriteLeaseMode(boolean noWriteLeaseMode)
true
do not return Lease object after write, false
return Lease
object after write.noWriteLeaseMode
- write mode.public boolean isNOWriteLeaseMode()
true
if do not return Lease object after write, otherwise
false
.public Object getFieldValue(String fieldName)
getFieldValue
in interface IGSEntry
fieldName
- name of the field (e.g. Field.getName()
.public Object setFieldValue(String fieldName, Object value)
setFieldValue
in interface IGSEntry
fieldName
- the field name.value
- value to be associated with the specified field.public String getFieldType(String fieldName)
getFieldType
in interface IGSEntry
fieldName
- the field name.public boolean isIndexedField(String fieldName)
isIndexedField
in interface IGSEntry
fieldName
- the field name.true
if the the field is indexed.public Object getFieldValue(int index) throws IllegalArgumentException, IllegalStateException
getFieldValue
in interface IGSEntry
index
- the field position.IllegalArgumentException
- if field name is not avaliableIllegalStateException
- if field values array was not properly setpublic Object setFieldValue(int index, Object value) throws IllegalArgumentException, IllegalStateException
setFieldValue
in interface IGSEntry
index
- the field position.value
- value to be associated with the specified field.IllegalArgumentException
- if field name is not avaliableIllegalStateException
- if field values array was not properly setpublic int getFieldPosition(String fieldName)
FieldsValues
array.getFieldPosition
in interface IGSEntry
fieldName
- name of the field (e.g. Field.getName()
.IGSEntry.getFieldsValues()
.public Entry getEntry(IJSpace space) throws UnusableEntryException
UnusableEntryException
public Object getObject(IJSpace space) throws UnusableEntryException
IGSEntry.setFieldValue(int, Object)
or IGSEntry.setFieldValue(String, Object)
.getObject
in interface IGSEntry
space
- Space proxy.UnusableEntryException
- One or more fields in the entry cannot be deserialized, or the
class for the entry type itself cannot be deserialized.public String getRoutingFieldName()
getRoutingFieldName
in interface IGSEntry
public void setRoutingFieldName(String routingFieldName)
routingFieldName
- the routing field namepublic Object clone()
public short getExtendedMatchCode(int index)
public Object getRangeValue(int index)
public boolean getRangeValueInclusion(int index)
public boolean isExtended()
public String toString()
ExternalEntry
.toString
in class Object
ExternalEntry
.Copyright © GigaSpaces.