use of io.atomix.primitive.service.impl.DefaultServiceExecutor in project atomix by atomix.
the class AbstractPrimitiveService method init.
@Override
public void init(ServiceContext context) {
this.context = context;
this.executor = new DefaultServiceExecutor(context);
this.log = ContextualLoggerFactory.getLogger(getClass(), LoggerContext.builder(PrimitiveService.class).addValue(context.serviceId()).add("type", context.serviceType()).add("name", context.serviceName()).build());
configure(executor);
}
use of io.atomix.primitive.service.impl.DefaultServiceExecutor in project atomix by atomix.
the class DefaultServiceExecutorTest method executor.
private ServiceExecutor executor() {
ServiceContext context = mock(ServiceContext.class);
when(context.serviceId()).thenReturn(PrimitiveId.from(1));
when(context.serviceType()).thenReturn(new TestPrimitiveType());
when(context.serviceName()).thenReturn("test");
when(context.currentOperation()).thenReturn(OperationType.COMMAND);
return new DefaultServiceExecutor(context);
}
Aggregations