Interface IReplicationNode
- All Known Implementing Classes:
ReplicationNode
public interface IReplicationNode
The interaction point between a single space instance and a cluster of spaces
- Since:
- 8.0
- Author:
- eitany
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the node, once closed the node is no longer usable.intexecute(IReplicationOutContext replicationContext) Executes the accumulated replication according to the given contextgetAdmin()voidoutCancelEntryLease(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry lease was canceledvoidoutChangeEntry(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry was changedvoidoutDataTypeAddIndex(IReplicationOutContext context, AddTypeIndexesRequestInfo addIndexesRequest) Notify the replication node that new index was added to this data typevoidoutDataTypeDrop(IReplicationOutContext context, String className) voidoutDataTypeIntroduce(IReplicationOutContext context, ITypeDesc typeDescriptor) Notify the replication node that new data type was introducedvoidoutEntryLeaseExpired(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry lease expiredvoidoutEvictEntry(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry was evictedvoidoutExtendEntryLeasePeriod(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry lease is extendedvoidoutExtendNotifyTemplateLeasePeriod(IReplicationOutContext context, NotifyTemplateHolder entryHolder) Notify replication node that a notify template lease is extendedvoidoutInsertNotifyTemplate(IReplicationOutContext context, NotifyTemplateHolder templateHolder) Notify replication node that a new notify template was insertedvoidoutNotificationSentAndExecute(OperationID operationId) Notify and dispatch the replication event representing that a notification was sent successfullyvoidoutNotifyTemplateLeaseExpired(IReplicationOutContext context, NotifyTemplateHolder templateHolder) Notify replication node that an notify template lease expiredvoidoutRemoveEntry(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry was removedvoidoutRemoveNotifyTemplate(IReplicationOutContext context, NotifyTemplateHolder templateHolder) Notify replication node that a notify template was removedvoidoutTransaction(IReplicationOutContext context, ServerTransaction transaction, ArrayList<IEntryHolder> lockedEntries) Notify replication node that a transaction is executed in one stage (one phase commit)voidoutTransactionAbort(IReplicationOutContext context, ServerTransaction transaction) Notify replication node that a transaction abort is executed (two phase commit)voidoutTransactionCommit(IReplicationOutContext context, ServerTransaction transaction) Notify replication node that a transaction commit is executed (two phase commit)voidoutTransactionPrepare(IReplicationOutContext context, ServerTransaction transaction, ArrayList<IEntryHolder> lockedEntries) Notify replication node that a transaction prepare is executed (two phase commit)voidoutUpdateEntry(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that an entry was updatedvoidoutWriteEntry(IReplicationOutContext context, IEntryHolder entryHolder) Notify replication node that a new entry was writtenvoidrollbackCopyReplica(ISpaceCopyResult replicaResult) voidsetBlobStoreReplicaConsumeHelper(BlobStoreReplicaConsumeHelper blobStoreReplicaHelper) voidsetBlobStoreReplicationBulkConsumeHelper(BlobStoreReplicationBulkConsumeHelper blobStoreReplicationBulkConsumeHelper) voidsetDirectPersistencyBackupSyncIteratorHandler(DirectPersistencyBackupSyncIteratorHandler directPersistencyBackupSyncIteratorHandler) voidSets a handler for incoming replication upon batch consumption completionvoidSets a handler for incoming data type replication event which was generated by a different node as a result ofoutDataTypeIntroduce(IReplicationOutContext, ITypeDesc)voidSets a handler for incoming data type add index replication event which was generated by a different node as a result ofoutDataTypeIntroduce(IReplicationOutContext, ITypeDesc)voidSets a handler for incoming write entry replication event which was generated by a different node as a result ofoutWriteEntry(IReplicationOutContext, IEntryHolder)voidSets a handler for incoming cancel entry lease replication event which was generated by a different node as a result ofoutCancelEntryLease(IReplicationOutContext, IEntryHolder)voidSets a handler for incoming entry lease expired replication event which was generated by a different node as a result ofoutCancelEntryLease(IReplicationOutContext, IEntryHolder)voidSets a handler for incoming extend lease replication event which was generated by a different node as a result ofoutExtendEntryLeasePeriod(IReplicationOutContext, IEntryHolder)voidSets a handler for incoming evict entry replication event which was generated by a different node as a result ofoutEvictEntry(IReplicationOutContext, IEntryHolder)voidSets a handler for incoming notification sent event which was generated by a different node as a result ofoutNotificationSentAndExecute(OperationID)voidSets a handler for incoming insert notify template replication event which was generated by a different node as a result ofoutInsertNotifyTemplate(IReplicationOutContext, NotifyTemplateHolder)voidSets a handler for incoming notify-template lease expired replication event which was generated by a different node as a result ofoutNotifyTemplateLeaseExpired(IReplicationOutContext, NotifyTemplateHolder)voidSets a handler for incoming extend lease replication event which was generated by a different node as a result of#outExtendNotifyTemplateLeasePeriod(IReplicationOutContext, IEntryHolder)voidSets a handler for incoming remove notify template replication event which was generated by a different node as a result ofoutRemoveNotifyTemplate(IReplicationOutContext, NotifyTemplateHolder)voidSets a handler for incoming transaction replication event which was generated by a different node as a result of#outTransaction(IReplicationOutContext, ServerTransaction, ArrayList<EntryCacheInfo>)Starts a space copy replica request, will copy the current state of a remote space.Starts a space synchronize replica request, will copy the current state of a remote space and synchronize with ongoing changes, the synchronization can only occurr if the target space has replication channel to this space (Recovery).
-
Method Details
-
outWriteEntry
Notify replication node that a new entry was written- Parameters:
context- the context of the operationentryHolder- written entry
-
setInEntryHandler
Sets a handler for incoming write entry replication event which was generated by a different node as a result ofoutWriteEntry(IReplicationOutContext, IEntryHolder) -
outUpdateEntry
Notify replication node that an entry was updated- Parameters:
context- the context of the operationentryHolder- updated entry
-
outChangeEntry
Notify replication node that an entry was changed- Parameters:
context- the context of the operationentryHolder- mutated entry- Since:
- 9.1
-
outRemoveEntry
Notify replication node that an entry was removed- Parameters:
context- the context of the operationentryHolder- removed entry
-
outCancelEntryLease
Notify replication node that an entry lease was canceled- Parameters:
context- the context of the operationentryHolder- entry of which its lease was canceled
-
outEntryLeaseExpired
Notify replication node that an entry lease expired- Parameters:
context- the context of the operationentryHolder- entry of which its lease expired
-
setInEntryLeaseCancelledHandler
Sets a handler for incoming cancel entry lease replication event which was generated by a different node as a result ofoutCancelEntryLease(IReplicationOutContext, IEntryHolder) -
setInEntryLeaseExpiredHandler
Sets a handler for incoming entry lease expired replication event which was generated by a different node as a result ofoutCancelEntryLease(IReplicationOutContext, IEntryHolder) -
outEvictEntry
Notify replication node that an entry was evicted- Parameters:
context- the context of the operationentryHolder- evicted entry
-
setInEvictEntryHandler
Sets a handler for incoming evict entry replication event which was generated by a different node as a result ofoutEvictEntry(IReplicationOutContext, IEntryHolder) -
outInsertNotifyTemplate
Notify replication node that a new notify template was inserted- Parameters:
context- the context of the operationtemplateHolder- inserted template
-
setInNotifyTemplateCreatedHandler
Sets a handler for incoming insert notify template replication event which was generated by a different node as a result ofoutInsertNotifyTemplate(IReplicationOutContext, NotifyTemplateHolder) -
outRemoveNotifyTemplate
Notify replication node that a notify template was removed- Parameters:
context- the context of the operationtemplateHolder- removed template
-
setInNotifyTemplateRemovedHandler
Sets a handler for incoming remove notify template replication event which was generated by a different node as a result ofoutRemoveNotifyTemplate(IReplicationOutContext, NotifyTemplateHolder) -
outNotifyTemplateLeaseExpired
void outNotifyTemplateLeaseExpired(IReplicationOutContext context, NotifyTemplateHolder templateHolder) Notify replication node that an notify template lease expired- Parameters:
context- the context of the operationtemplateHolder- of which its lease expired
-
setInNotifyTemplateLeaseExpiredHandler
void setInNotifyTemplateLeaseExpiredHandler(IReplicationInNotifyTemplateLeaseExpiredHandler handler) Sets a handler for incoming notify-template lease expired replication event which was generated by a different node as a result ofoutNotifyTemplateLeaseExpired(IReplicationOutContext, NotifyTemplateHolder) -
outExtendEntryLeasePeriod
Notify replication node that an entry lease is extended- Parameters:
context- the context of the operation
-
setInNotifyTemplateLeaseExtendedHandler
void setInNotifyTemplateLeaseExtendedHandler(IReplicationInNotifyTemplateLeaseExtendedHandler handler) Sets a handler for incoming extend lease replication event which was generated by a different node as a result of#outExtendNotifyTemplateLeasePeriod(IReplicationOutContext, IEntryHolder) -
outExtendNotifyTemplateLeasePeriod
void outExtendNotifyTemplateLeasePeriod(IReplicationOutContext context, NotifyTemplateHolder entryHolder) Notify replication node that a notify template lease is extended- Parameters:
context- the context of the operation
-
setInEntryLeaseExtendedHandler
Sets a handler for incoming extend lease replication event which was generated by a different node as a result ofoutExtendEntryLeasePeriod(IReplicationOutContext, IEntryHolder) -
outTransaction
void outTransaction(IReplicationOutContext context, ServerTransaction transaction, ArrayList<IEntryHolder> lockedEntries) Notify replication node that a transaction is executed in one stage (one phase commit)- Parameters:
transaction- executed transactionlockedEntries- entries participating in the transaction and their corresponding operation
-
outTransactionPrepare
void outTransactionPrepare(IReplicationOutContext context, ServerTransaction transaction, ArrayList<IEntryHolder> lockedEntries) Notify replication node that a transaction prepare is executed (two phase commit)- Parameters:
transaction- prepared transactionlockedEntries- entries participating in the transaction and their corresponding operation
-
outTransactionCommit
Notify replication node that a transaction commit is executed (two phase commit)- Parameters:
transaction- committed transaction
-
outTransactionAbort
Notify replication node that a transaction abort is executed (two phase commit)- Parameters:
transaction- committed transaction
-
setInTransactionHandler
Sets a handler for incoming transaction replication event which was generated by a different node as a result of#outTransaction(IReplicationOutContext, ServerTransaction, ArrayList<EntryCacheInfo>) -
outNotificationSentAndExecute
Notify and dispatch the replication event representing that a notification was sent successfully- Parameters:
OperationID- the operation Id of the event
-
outDataTypeIntroduce
Notify the replication node that new data type was introduced- Parameters:
typeDescriptor- the updated type descriptor
-
outDataTypeAddIndex
void outDataTypeAddIndex(IReplicationOutContext context, AddTypeIndexesRequestInfo addIndexesRequest) Notify the replication node that new index was added to this data type -
setInDataTypeCreatedHandler
Sets a handler for incoming data type replication event which was generated by a different node as a result ofoutDataTypeIntroduce(IReplicationOutContext, ITypeDesc) -
setInDataTypeIndexAddedHandler
Sets a handler for incoming data type add index replication event which was generated by a different node as a result ofoutDataTypeIntroduce(IReplicationOutContext, ITypeDesc) -
setInNotificationSentHandler
Sets a handler for incoming notification sent event which was generated by a different node as a result ofoutNotificationSentAndExecute(OperationID) -
setInBatchConsumptionHandler
Sets a handler for incoming replication upon batch consumption completion -
createContext
IReplicationOutContext createContext()- Returns:
- create a replication out context
-
execute
Executes the accumulated replication according to the given context- Parameters:
replicationContext- replication context- Returns:
- true number of completed replications.
-
getAdmin
IReplicationNodeAdmin getAdmin()- Returns:
- administrator of the replication node
-
spaceSynchronizeReplicaRequest
ISpaceSynchronizeReplicaState spaceSynchronizeReplicaRequest(ISpaceSynchronizeReplicaRequestContext context) Starts a space synchronize replica request, will copy the current state of a remote space and synchronize with ongoing changes, the synchronization can only occurr if the target space has replication channel to this space (Recovery).- Returns:
- space synchronize replica state representing the current progress of the synchronization
-
spaceCopyReplicaRequest
Starts a space copy replica request, will copy the current state of a remote space. Should be used when the target space is in a static state, meaning its data state do not change during the copy, otherwise the copy result is not guaranteed to be an exact replica of the target space (Offline copy, for admin purposes).- Returns:
- space copy replica state representing the current progress of the copy operation
-
rollbackCopyReplica
-
setBlobStoreReplicaConsumeHelper
-
getBlobStoreReplicaConsumeHelper
BlobStoreReplicaConsumeHelper getBlobStoreReplicaConsumeHelper() -
getDirectPesistencySyncHandler
IDirectPersistencySyncHandler getDirectPesistencySyncHandler() -
getDirectPersistencyBackupSyncIteratorHandler
DirectPersistencyBackupSyncIteratorHandler getDirectPersistencyBackupSyncIteratorHandler() -
setDirectPersistencyBackupSyncIteratorHandler
void setDirectPersistencyBackupSyncIteratorHandler(DirectPersistencyBackupSyncIteratorHandler directPersistencyBackupSyncIteratorHandler) -
close
void close()Closes the node, once closed the node is no longer usable. -
setBlobStoreReplicationBulkConsumeHelper
void setBlobStoreReplicationBulkConsumeHelper(BlobStoreReplicationBulkConsumeHelper blobStoreReplicationBulkConsumeHelper) -
getBlobStoreReplicationBulkConsumeHelper
BlobStoreReplicationBulkConsumeHelper getBlobStoreReplicationBulkConsumeHelper() -
outDataTypeDrop
-