public interface FragmentedMigrationAwareService extends MigrationAwareService
FragmentedMigrationAwareService
is an extension to the MigrationAwareService
which allows
migration/replication of partition replicas in smaller fragments.
Each replica fragment is distinguished by a ServiceNamespace
, all replica data belonging to
a specific namespace will be transferred in the same packet.
Both backup and backup aware operations created by FragmentedMigrationAwareService
must implement
ServiceNamespaceAware
interface and must know their related ServiceNamespace
s.
Fragmented migration can be enabled/disabled using configuration property
GroupProperty.PARTITION_FRAGMENTED_MIGRATION_ENABLED
. Anti-entropy system which
detects and completes inconsistent backup replicas, always uses fragmented replication for services having support.
MigrationAwareService
,
ServiceNamespace
,
ServiceNamespaceAware
Modifier and Type | Method and Description |
---|---|
Collection<ServiceNamespace> |
getAllServiceNamespaces(PartitionReplicationEvent event)
Returns all known namespaces for given replication event.
|
boolean |
isKnownServiceNamespace(ServiceNamespace namespace)
Returns true if namespace is known by this service, false otherwise
|
Operation |
prepareReplicationOperation(PartitionReplicationEvent event,
Collection<ServiceNamespace> namespaces)
Returns an operation to replicate service data and/or state for a specific partition replica and namespaces
on another cluster member.
|
beforeMigration, commitMigration, prepareReplicationOperation, rollbackMigration
Collection<ServiceNamespace> getAllServiceNamespaces(PartitionReplicationEvent event)
event
- replication eventboolean isKnownServiceNamespace(ServiceNamespace namespace)
namespace
- namespaceOperation prepareReplicationOperation(PartitionReplicationEvent event, Collection<ServiceNamespace> namespaces)
MigrationAwareService.prepareReplicationOperation(PartitionReplicationEvent)
,
instead of copying whole partition replica, allows copying only some portion of replica,
specified by given namespaces.
This method will be called on source member whenever partitioning system requires to copy/replicate a partition replica. Returned operation will be executed on destination member. If operation fails by throwing exception, migration process will fail and will be rolled back.
Returning null is allowed and means service does not have anything to replicate.
event
- replication eventnamespaces
- replica fragment namespaces to replicateMigrationAwareService.prepareReplicationOperation(PartitionReplicationEvent)
Copyright © 2018 Hazelcast, Inc.. All rights reserved.