Search in sources :

Example 1 with ScatteredStateProvider

use of org.infinispan.scattered.ScatteredStateProvider in project infinispan by infinispan.

the class ScatteredStateConfirmRevokedCommand method invokeAsync.

@Override
public CompletionStage<?> invokeAsync(ComponentRegistry registry) throws Throwable {
    ScatteredStateProvider stateProvider = (ScatteredStateProvider) registry.getStateTransferManager().getStateProvider();
    BiasManager biasManager = registry.getBiasManager().running();
    return stateProvider.confirmRevokedSegments(topologyId).thenApply(nil -> {
        if (biasManager != null) {
            biasManager.revokeLocalBiasForSegments(segments);
        }
        return null;
    });
}
Also used : ScatteredStateProvider(org.infinispan.scattered.ScatteredStateProvider) BiasManager(org.infinispan.scattered.BiasManager)

Example 2 with ScatteredStateProvider

use of org.infinispan.scattered.ScatteredStateProvider in project infinispan by infinispan.

the class ScatteredStateGetKeysCommand method invokeAsync.

@Override
public CompletionStage<?> invokeAsync(ComponentRegistry registry) throws Throwable {
    ScatteredStateProvider stateProvider = (ScatteredStateProvider) registry.getStateTransferManager().getStateProvider();
    stateProvider.startKeysTransfer(segments, origin);
    return CompletableFutures.completedNull();
}
Also used : ScatteredStateProvider(org.infinispan.scattered.ScatteredStateProvider)

Aggregations

ScatteredStateProvider (org.infinispan.scattered.ScatteredStateProvider)2 BiasManager (org.infinispan.scattered.BiasManager)1