Package com.j_spaces.sadapter.datasource
Class BulkDataItem
java.lang.Object
com.j_spaces.core.AbstractEntryType
com.j_spaces.core.EntryImpl
com.j_spaces.sadapter.cache.CacheEntry
com.j_spaces.sadapter.datasource.EntryAdapter
com.j_spaces.sadapter.datasource.BulkDataItem
- All Implemented Interfaces:
BulkItem,DataSyncOperation,IGSEntry,InternalBulkItem,Serializable
- Direct Known Subclasses:
ChangeBulkDataItem,PartialUpdateBulkDataItem
BulkDataItem is used by the space for execution of bulk operations
in case of transactions and mirror replication.
BulkDataItem contains the data object and the operation that needs to be executed.
in case of transactions and mirror replication.
BulkDataItem contains the data object and the operation that needs to be executed.
- Author:
- anna
- See Also:
-
Field Summary
Fields inherited from class com.j_spaces.sadapter.datasource.EntryAdapter
_converterFields inherited from class com.j_spaces.core.EntryImpl
_entryHolderFields inherited from class com.j_spaces.core.AbstractEntryType
_typeDesc -
Constructor Summary
ConstructorsConstructorDescriptionBulkDataItem(IEntryHolder entryHolder, ITypeDesc typeDesc, short operation) Constructs aBulkDataItemout of IEntryHolder and TypeTableEntry.BulkDataItem(IEntryHolder entryHolder, ITypeDesc typeDesc, short operation, IDataConverter<IEntryPacket> converter) Constructs aBulkDataItemout of IEntryHolder and TypeTableEntry.
Given converter is used for internal entry conversion. -
Method Summary
Methods inherited from class com.j_spaces.sadapter.datasource.EntryAdapter
getConverter, getTypeDescriptor, setConverter, toDocument, toDocument, toEntry, toEntry, toEntryPacket, toObjectMethods inherited from class com.j_spaces.sadapter.cache.CacheEntry
getClassName, getEntry, getMapEntry, setClassName, toStringMethods inherited from class com.j_spaces.core.EntryImpl
getFieldsValues, getFieldValue, getFieldValue, getHandback, getNotifyType, getTimeToLive, getUID, getVersion, isTransient, setFieldValue, setFieldValueMethods inherited from class com.j_spaces.core.AbstractEntryType
getCodebase, getFieldPosition, getFieldsNames, getFieldsTypes, getFieldType, getIndexIndicators, getObject, getPrimaryKeyName, getProperties, getRoutingFieldName, getSuperClassesNames, hasDummyTTE, isBroadcast, isFifo, isIndexedField, isReplicatableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.gigaspaces.datasource.BulkItem
getChangedPropertiesMethods inherited from interface com.gigaspaces.sync.DataSyncOperation
getTypeDescriptorMethods inherited from interface com.j_spaces.sadapter.datasource.InternalBulkItem
setConverter, toEntryPacket
-
Constructor Details
-
BulkDataItem
Constructs aBulkDataItemout of IEntryHolder and TypeTableEntry.- Parameters:
entryHolder- underlying entry holdertypeDesc- underlying entry type informationoperation- one of the qualifiedBulkItemoperations.
-
BulkDataItem
public BulkDataItem(IEntryHolder entryHolder, ITypeDesc typeDesc, short operation, IDataConverter<IEntryPacket> converter) Constructs aBulkDataItemout of IEntryHolder and TypeTableEntry.
Given converter is used for internal entry conversion.
-
-
Method Details
-
getItem
Description copied from interface:BulkItemReturn the data item -
getOperation
public short getOperation()Description copied from interface:BulkItemReturn the operation to execute- Specified by:
getOperationin interfaceBulkItem- Returns:
- operation type
BulkItem.REMOVE/BulkItem.UPDATE/BulkItem.WRITE/BulkItem.PARTIAL_UPDATE
-
toString
- Overrides:
toStringin classCacheEntry
-
getTypeName
- Specified by:
getTypeNamein interfaceBulkItem- Returns:
- the name of the type/class
-
getIdPropertyName
- Specified by:
getIdPropertyNamein interfaceBulkItem- Returns:
- the name of the id property
-
getIdPropertyValue
- Specified by:
getIdPropertyValuein interfaceBulkItem- Returns:
- the value of the id property
-
getSpaceId
- Specified by:
getSpaceIdin interfaceDataSyncOperation- Returns:
- The operation's data Id.
-
supportsGetSpaceId
public boolean supportsGetSpaceId()- Specified by:
supportsGetSpaceIdin interfaceDataSyncOperation- Returns:
- whether this data operation support the
DataSyncOperation.getSpaceId()operation.
-
getItemValues
- Specified by:
getItemValuesin interfaceBulkItem- Returns:
- a map of the object properties. The keys are the names of the properties and their values is the object values. In case of a partial update - only the updated values are returned.s
-
getUid
- Specified by:
getUidin interfaceDataSyncOperation- Returns:
- The operation's data UID.
-
getDataSyncOperationType
- Specified by:
getDataSyncOperationTypein interfaceDataSyncOperation- Returns:
- the operation type.
-
getDataAsObject
- Specified by:
getDataAsObjectin interfaceDataSyncOperation- Returns:
- the operation data as object (i.e pojo), this can only be used if
DataSyncOperation.supportsDataAsObject()return true, otherwise an exception will be thrown.
-
getDataAsDocument
- Specified by:
getDataAsDocumentin interfaceDataSyncOperation- Returns:
- the operation data as space document, this can only be used if
DataSyncOperation.supportsDataAsDocument()return true, otherwise an exception will be thrown.
-
supportsGetTypeDescriptor
public boolean supportsGetTypeDescriptor()- Specified by:
supportsGetTypeDescriptorin interfaceDataSyncOperation- Returns:
- whether this data operation support the
DataSyncOperation.getTypeDescriptor()operation.
-
supportsDataAsObject
public boolean supportsDataAsObject()- Specified by:
supportsDataAsObjectin interfaceDataSyncOperation- Returns:
- whether this data operation support the
DataSyncOperation.getDataAsObject()operation.
-
supportsDataAsDocument
public boolean supportsDataAsDocument()- Specified by:
supportsDataAsDocumentin interfaceDataSyncOperation- Returns:
- whether this data operation support the
DataSyncOperation.getDataAsDocument()operation.
-