コード例 #1
0
ファイル: MapService.java プロジェクト: rocio/hazelcast
 public void commitMigration(PartitionMigrationEvent event) {
   migrateIndex(event);
   if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) {
     clearPartitionData(event.getPartitionId());
   }
   ownedPartitions.set(getMemberPartitions());
 }
コード例 #2
0
ファイル: MapService.java プロジェクト: rocio/hazelcast
 private void migrateIndex(PartitionMigrationEvent event) {
   final PartitionContainer container = partitionContainers[event.getPartitionId()];
   for (RecordStore recordStore : container.getMaps().values()) {
     final MapContainer mapContainer = getMapContainer(recordStore.getName());
     final IndexService indexService = mapContainer.getIndexService();
     if (indexService.hasIndex()) {
       for (Record record : recordStore.getReadonlyRecordMap().values()) {
         if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) {
           indexService.removeEntryIndex(record.getKey());
         } else {
           Object value = record.getValue();
           if (value != null) {
             indexService.saveEntryIndex(
                 new QueryEntry(
                     getSerializationService(), record.getKey(), record.getKey(), value));
           }
         }
       }
     }
   }
 }
コード例 #3
0
 public void rollbackMigration(PartitionMigrationEvent event) {
   clearMigrationData(event.getPartitionId());
 }
コード例 #4
0
 public void commitMigration(PartitionMigrationEvent event) {
   if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) {
     clearMigrationData(event.getPartitionId());
   }
 }
コード例 #5
0
 @Override
 public void rollbackMigration(PartitionMigrationEvent event) {
   if (event.getMigrationEndpoint() == MigrationEndpoint.DESTINATION) {
     clearPartitionReplica(event.getPartitionId());
   }
 }
コード例 #6
0
 @Override
 public void commitMigration(PartitionMigrationEvent event) {
   if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) {
     clearPartitionReplica(event.getPartitionId());
   }
 }
コード例 #7
0
ファイル: MapService.java プロジェクト: rocio/hazelcast
 public void rollbackMigration(PartitionMigrationEvent event) {
   if (event.getMigrationEndpoint() == MigrationEndpoint.DESTINATION) {
     clearPartitionData(event.getPartitionId());
   }
   ownedPartitions.set(getMemberPartitions());
 }