use of io.atomix.primitive.operation.OperationType in project atomix by atomix.
the class PrimaryElectorServiceTest method newService.
PrimaryElectorService newService() {
PrimaryElectorService elector = new PrimaryElectorService();
elector.init(new ServiceContext() {
@Override
public PrimitiveId serviceId() {
return PrimitiveId.from(1L);
}
@Override
public String serviceName() {
return "test-primary-elector";
}
@SuppressWarnings("rawtypes")
@Override
public PrimitiveType serviceType() {
return PrimaryElectorType.instance();
}
@Override
public MemberId localMemberId() {
return null;
}
@Override
public <C extends ServiceConfig> C serviceConfig() {
return null;
}
@Override
public long currentIndex() {
return 0;
}
@Override
public Session<?> currentSession() {
return null;
}
@Override
public OperationType currentOperation() {
return null;
}
@Override
public LogicalClock logicalClock() {
return null;
}
@Override
public WallClock wallClock() {
return null;
}
});
elector.tick(WallClockTimestamp.from(System.currentTimeMillis()));
return elector;
}
Aggregations