All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.camunda.zeebe.broker.partitioning.NoOpPartitionAdminAccess Maven / Gradle / Ivy

There is a newer version: 8.7.0-alpha1
Show newest version
/*
 * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
 * one or more contributor license agreements. See the NOTICE file distributed
 * with this work for additional information regarding copyright ownership.
 * Licensed under the Camunda License 1.0. You may not use this file
 * except in compliance with the Camunda License 1.0.
 */
package io.camunda.zeebe.broker.partitioning;

import io.camunda.zeebe.broker.Loggers;
import io.camunda.zeebe.broker.system.configuration.FlowControlCfg;
import io.camunda.zeebe.logstreams.impl.flowcontrol.FlowControlLimits;
import io.camunda.zeebe.scheduler.future.ActorFuture;
import io.camunda.zeebe.scheduler.future.CompletableActorFuture;
import java.util.Optional;
import org.slf4j.Logger;

public final class NoOpPartitionAdminAccess implements PartitionAdminAccess {

  private static final Logger LOG = Loggers.SYSTEM_LOGGER;

  @Override
  public Optional forPartition(final int partitionId) {
    return Optional.empty();
  }

  @Override
  public ActorFuture takeSnapshot() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture pauseExporting() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture softPauseExporting() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture resumeExporting() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture pauseProcessing() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture resumeProcessing() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture banInstance(final long processInstanceKey) {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture configureFlowControl(final FlowControlCfg flowControlCfg) {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  @Override
  public ActorFuture getFlowControlConfiguration() {
    logCall();
    return CompletableActorFuture.completed(null);
  }

  private void logCall() {
    LOG.warn("Received call on NoOp implementation of PartitionAdminAccess");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy