Search in sources :

Example 6 with PartitionStateManager

use of com.hazelcast.internal.partition.impl.PartitionStateManager in project hazelcast by hazelcast.

the class BeforePromotionOperation method beforeRun.

@Override
public void beforeRun() throws Exception {
    sendMigrationEvent(STARTED);
    InternalPartitionServiceImpl service = getService();
    PartitionStateManager partitionStateManager = service.getPartitionStateManager();
    partitionStateManager.setMigratingFlag(getPartitionId());
}
Also used : InternalPartitionServiceImpl(com.hazelcast.internal.partition.impl.InternalPartitionServiceImpl) PartitionStateManager(com.hazelcast.internal.partition.impl.PartitionStateManager)

Example 7 with PartitionStateManager

use of com.hazelcast.internal.partition.impl.PartitionStateManager in project hazelcast by hazelcast.

the class FinalizePromotionOperation method afterRun.

@Override
public void afterRun() throws Exception {
    InternalPartitionServiceImpl service = getService();
    PartitionStateManager partitionStateManager = service.getPartitionStateManager();
    partitionStateManager.clearMigratingFlag(getPartitionId());
    sendMigrationEvent(success ? COMPLETED : FAILED);
}
Also used : InternalPartitionServiceImpl(com.hazelcast.internal.partition.impl.InternalPartitionServiceImpl) PartitionStateManager(com.hazelcast.internal.partition.impl.PartitionStateManager)

Aggregations

InternalPartitionServiceImpl (com.hazelcast.internal.partition.impl.InternalPartitionServiceImpl)7 PartitionStateManager (com.hazelcast.internal.partition.impl.PartitionStateManager)7 InternalPartitionImpl (com.hazelcast.internal.partition.impl.InternalPartitionImpl)3 Address (com.hazelcast.nio.Address)3 ILogger (com.hazelcast.logging.ILogger)2 MigrationInfo (com.hazelcast.internal.partition.MigrationInfo)1 MigrationManager (com.hazelcast.internal.partition.impl.MigrationManager)1 NodeEngine (com.hazelcast.spi.NodeEngine)1 RetryableHazelcastException (com.hazelcast.spi.exception.RetryableHazelcastException)1 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)1