Search in sources :

Example 1 with DistributedLogServer

use of io.atomix.protocols.log.DistributedLogServer in project atomix by atomix.

the class LogPartitionServer method stop.

@Override
public CompletableFuture<Void> stop() {
    DistributedLogServer server = this.server;
    if (server != null) {
        return server.stop().exceptionally(throwable -> {
            log.error("Failed stopping server for {}", partition.id(), throwable);
            return null;
        }).thenRun(() -> started.set(false));
    }
    started.set(false);
    return CompletableFuture.completedFuture(null);
}
Also used : ThreadContextFactory(io.atomix.utils.concurrent.ThreadContextFactory) DistributedLogServer(io.atomix.protocols.log.DistributedLogServer) Logger(org.slf4j.Logger) PartitionManagementService(io.atomix.primitive.partition.PartitionManagementService) LogPartition(io.atomix.protocols.log.partition.LogPartition) LoggerFactory(org.slf4j.LoggerFactory) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) CompletableFuture(java.util.concurrent.CompletableFuture) Serializer(io.atomix.utils.serializer.Serializer) LogNamespaces(io.atomix.protocols.log.serializer.impl.LogNamespaces) Managed(io.atomix.utils.Managed) LogPartitionGroupConfig(io.atomix.protocols.log.partition.LogPartitionGroupConfig) DistributedLogServer(io.atomix.protocols.log.DistributedLogServer)

Aggregations

PartitionManagementService (io.atomix.primitive.partition.PartitionManagementService)1 DistributedLogServer (io.atomix.protocols.log.DistributedLogServer)1 LogPartition (io.atomix.protocols.log.partition.LogPartition)1 LogPartitionGroupConfig (io.atomix.protocols.log.partition.LogPartitionGroupConfig)1 LogNamespaces (io.atomix.protocols.log.serializer.impl.LogNamespaces)1 Managed (io.atomix.utils.Managed)1 ThreadContextFactory (io.atomix.utils.concurrent.ThreadContextFactory)1 Serializer (io.atomix.utils.serializer.Serializer)1 CompletableFuture (java.util.concurrent.CompletableFuture)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1