class MastershipManager extends AbstractListenerManager<MastershipEvent, MastershipListener> implements MastershipService, MastershipAdminService, MastershipTermService,
               MetricsHelper {

    @Override
    public CompletableFuture<Void> relinquishMastership(DeviceId deviceId) {
        checkPermission(CLUSTER_WRITE);
        return store.relinquishRole(localNodeId, deviceId)
                    .thenAccept(this::post)
                    .thenApply(v -> null);
    }

}