io.zeebe.logstreams.impl.service.LogStreamServiceNames Maven / Gradle / Ivy
/*
* Copyright © 2017 camunda services GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.zeebe.logstreams.impl.service;
import io.zeebe.dispatcher.Dispatcher;
import io.zeebe.dispatcher.Subscription;
import io.zeebe.logstreams.impl.LogBlockIndexWriter;
import io.zeebe.logstreams.impl.LogStorageAppender;
import io.zeebe.logstreams.impl.log.index.LogBlockIndex;
import io.zeebe.logstreams.log.LogStream;
import io.zeebe.logstreams.spi.LogStorage;
import io.zeebe.servicecontainer.ServiceName;
public class LogStreamServiceNames {
public static final ServiceName logStreamRootServiceName(String logName) {
return ServiceName.newServiceName(String.format("logstream.%s", logName), Void.class);
}
public static final ServiceName logStreamServiceName(String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.service", logName), LogStream.class);
}
public static final ServiceName logStorageServiceName(String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.storage", logName), LogStorage.class);
}
public static final ServiceName logStorageAppenderServiceName(
String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.storage.appender", logName), LogStorageAppender.class);
}
public static final ServiceName logBlockIndexServiceName(String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.blockIdx", logName), LogBlockIndex.class);
}
public static final ServiceName logBlockIndexWriterService(String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.blockIdx.writer", logName), LogBlockIndexWriter.class);
}
public static final ServiceName logWriteBufferServiceName(String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.writeBuffer", logName), Dispatcher.class);
}
public static final ServiceName logWriteBufferSubscriptionServiceName(
String logName, String subscriptionName) {
return ServiceName.newServiceName(
String.format("logstream.%s.writeBuffer.subscription.%s", logName, subscriptionName),
Subscription.class);
}
public static final ServiceName logStorageAppenderRootService(String logName) {
return ServiceName.newServiceName(
String.format("logstream.%s.storage.appender-root", logName), Void.class);
}
public static final ServiceName streamProcessorService(
String logName, String processorName) {
return ServiceName.newServiceName(
String.format("logstream.%s.processor.%s", logName, processorName),
StreamProcessorService.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy