Class EntryPacket
java.lang.Object
com.gigaspaces.internal.serialization.AbstractExternalizable
com.gigaspaces.internal.transport.AbstractEntryPacket
com.gigaspaces.internal.transport.EntryPacket
- All Implemented Interfaces:
RawEntry,ISwapExternalizable,IEntryPacket,ITransportPacket,IMVCCEntryPacket,Textualizable,SmartExternalizable,Externalizable,Serializable,Cloneable
- Direct Known Subclasses:
ExternalEntryPacket,JoinedEntry,TemplatePacket
This class represents a packet of information transmitted between a J-Space client and its
J-Space server (and vice versa). The information transmitted is composed of 2 types:
information on the entry's class, and information on the entry's data (the fields' values). Since
the protocol between J-Space client and server are designed for minimum data passing, most of the
fields in an EntryPacket are usually null (they are transmitted once for each entry class in a
client's life-time). All the fields in this class are public, in order to increase access
and modification speed (no need to call a method).
- Version:
- 1.0
- Author:
- Igor Goldenberg
- See Also:
-
Field Summary
FieldsFields inherited from class com.gigaspaces.internal.transport.AbstractEntryPacket
_entryType, _entryTypeCode, _typeDesc, _typeDescChecksum -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructor required byExternalizable.EntryPacket(ITypeDesc typeDesc, EntryType entryType, Object[] fixedProperties, Map<String, Object> dynamicProperties, String uid, int version, long timeToLive, boolean isTransient) protectedEntryPacket(ITypeDesc typeDesc, Object[] values) -
Method Summary
Modifier and TypeMethodDescriptionvoidclone()Returns a shallow copy of this EntryPacket instance.getFieldValue(int index) Object[]String[]longgetTTL()getUID()intbooleantrue if the entry packet has an array of fixed propertiesbooleanisFifo()booleanIf packet is using not for recovery, metadata is not applied -> has default valuesbooleanbooleanbooleanprotected voidreadExternal(ObjectInput in, PlatformLogicalVersion version) voidvoidsetCustomQuery(ICustomQuery customQuery) voidsetDynamicProperties(Map<String, Object> dynamicProperties) voidsetFieldsValues(Object[] values) voidsetFieldValue(int index, Object value) voidsetMultipleUIDs(String[] multipleUIDs) voidsetReturnOnlyUIDs(boolean returnOnlyUIDs) voidsetTTL(long ttl) voidvoidsetVersion(int version) protected voidwriteExternal(ObjectOutput out, PlatformLogicalVersion version) voidwriteToSwap(ObjectOutput out) Methods inherited from class com.gigaspaces.internal.transport.AbstractEntryPacket
equals, getCodebase, getEntryType, getExternalEntryImplClassName, getID, getIdImpl, getOperationID, getPreviousVersion, getPropertyValue, getRoutingFieldValue, getTypeDescChecksum, getTypeDescriptor, hashCode, hasPreviousVersion, isExternalizableEntryPacket, isSerializeTypeDesc, readExternalImpl, setOperationID, setPreviousVersion, setPropertyValue, setSerializeTypeDesc, setTypeDesc, supportsTypeDescChecksum, toObject, toObject, toObject, toObject, toString, toText, validateStorageType, writeExternalImplMethods inherited from class com.gigaspaces.internal.serialization.AbstractExternalizable
readExternal, writeExternalMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.io.Externalizable
readExternal, writeExternalMethods inherited from interface com.gigaspaces.internal.transport.IEntryPacket
allNullFieldValues, getID, getPreviousVersion, hasPreviousVersion, isExternalizableEntryPacket, isHybrid, setPreviousVersionMethods inherited from interface com.gigaspaces.internal.transport.ITransportPacket
getCodebase, getEntryType, getExternalEntryImplClassName, getOperationID, getPropertyValue, getRoutingFieldValue, getTypeDescChecksum, getTypeDescriptor, isSerializeTypeDesc, setOperationID, setPropertyValue, setSerializeTypeDesc, setTypeDesc, supportsTypeDescChecksum, toObject, toObject, toObject, toObjectMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
_typeName
-
_returnOnlyUIDs
protected boolean _returnOnlyUIDs
-
-
Constructor Details
-
EntryPacket
public EntryPacket()Default constructor required byExternalizable. -
EntryPacket
-
EntryPacket
-
-
Method Details
-
clone
Returns a shallow copy of this EntryPacket instance. And also only clone the values array.- Specified by:
clonein interfaceIEntryPacket- Overrides:
clonein classAbstractEntryPacket- Returns:
- a shallow clone of this EntryPacket instance.
-
getPacketType
- Specified by:
getPacketTypein interfaceITransportPacket
-
getTypeName
- Specified by:
getTypeNamein interfaceITransportPacket
-
getUID
- Specified by:
getUIDin interfaceITransportPacket
-
setUID
- Specified by:
setUIDin interfaceIEntryPacket
-
getMultipleUIDs
- Specified by:
getMultipleUIDsin interfaceITransportPacket
-
setMultipleUIDs
- Specified by:
setMultipleUIDsin interfaceITransportPacket
-
isReturnOnlyUids
public boolean isReturnOnlyUids() -
setReturnOnlyUIDs
public void setReturnOnlyUIDs(boolean returnOnlyUIDs) -
getDynamicProperties
- Specified by:
getDynamicPropertiesin interfaceITransportPacket
-
setDynamicProperties
- Specified by:
setDynamicPropertiesin interfaceITransportPacket
-
getFieldValues
- Specified by:
getFieldValuesin interfaceITransportPacket
-
setFieldsValues
- Specified by:
setFieldsValuesin interfaceITransportPacket
-
getFieldValue
- Specified by:
getFieldValuein interfaceITransportPacket
-
setFieldValue
- Specified by:
setFieldValuein interfaceITransportPacket
-
isTransient
public boolean isTransient()- Specified by:
isTransientin interfaceITransportPacket
-
isFifo
public boolean isFifo()- Specified by:
isFifoin interfaceITransportPacket
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceITransportPacket
-
setVersion
public void setVersion(int version) - Specified by:
setVersionin interfaceITransportPacket
-
getTTL
public long getTTL()- Specified by:
getTTLin interfaceIEntryPacket
-
setTTL
public void setTTL(long ttl) - Specified by:
setTTLin interfaceIEntryPacket
-
isNoWriteLease
public boolean isNoWriteLease()- Specified by:
isNoWriteLeasein interfaceITransportPacket
-
getCustomQuery
- Specified by:
getCustomQueryin interfaceITransportPacket
-
setCustomQuery
- Specified by:
setCustomQueryin interfaceIEntryPacket
-
writeToSwap
- Specified by:
writeToSwapin interfaceISwapExternalizable- Overrides:
writeToSwapin classAbstractEntryPacket- Throws:
IOException
-
readFromSwap
- Specified by:
readFromSwapin interfaceISwapExternalizable- Overrides:
readFromSwapin classAbstractEntryPacket- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Overrides:
writeExternalin classAbstractEntryPacket- Throws:
IOException
-
readExternal
protected void readExternal(ObjectInput in, PlatformLogicalVersion version) throws IOException, ClassNotFoundException - Overrides:
readExternalin classAbstractEntryPacket- Throws:
IOExceptionClassNotFoundException
-
hasFixedPropertiesArray
public boolean hasFixedPropertiesArray()true if the entry packet has an array of fixed properties- Specified by:
hasFixedPropertiesArrayin interfaceIEntryPacket- Overrides:
hasFixedPropertiesArrayin classAbstractEntryPacket
-
applyMVCCEntryMetadata
- Specified by:
applyMVCCEntryMetadatain interfaceIMVCCEntryPacket
-
isMVCCEntryMetadataApplied
public boolean isMVCCEntryMetadataApplied()If packet is using not for recovery, metadata is not applied -> has default values- Specified by:
isMVCCEntryMetadataAppliedin interfaceIMVCCEntryPacket
-
getMVCCEntryMetadata
- Specified by:
getMVCCEntryMetadatain interfaceIMVCCEntryPacket
-