Interface ActorClockActuator
public interface ActorClockActuator
Java interface for the broker's actor clock actuator (roughly mapping to the broker admin
service). To instantiate this interface, you can use
Feign; see of(String) as an
example.
You can use one of of(String) or of(ZeebeBrokerNode) to create a new client
to use for yourself.
Adding a new method is simple: simply define the input/output here as you normally would, and
make sure to add the correct JSON encoding headers (`Accept` for the response type,
`Content-Type` if there's a body to send). See LoggersActuator for a more complete
example.
This actuator should only be used for testing purposes. To use it in a test class, requires the controllable clock to be enabled through configuration as such: `testStandaloneBroker.withProperty("zeebe.clock.controlled", true)`
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionaddTime(ActorClockActuator.AddTimeRequest request) static ActorClockActuatorof(TestStandaloneBroker node) Returns aActorClockActuatorinstance using the given node as upstream.static ActorClockActuatorof(io.zeebe.containers.ZeebeBrokerNode<?> node) Returns aActorClockActuatorinstance using the given node as upstream.static ActorClockActuatorReturns aActorClockActuatorinstance using the given endpoint as upstream.
-
Method Details
-
of
Returns aActorClockActuatorinstance using the given node as upstream. This only acceptsZeebeBrokerNodeat the moment, as only the broker has this actuator. It can be changed if we move these to the gateway.- Parameters:
node- the node to connect to- Returns:
- a new instance of
ActorClockActuator
-
of
Returns aActorClockActuatorinstance using the given node as upstream. This only acceptsTestStandaloneBrokerat the moment, as only the broker has this actuator. It can be changed if we move these to the gateway.- Parameters:
node- the node to connect to- Returns:
- a new instance of
ActorClockActuator
-
of
Returns aActorClockActuatorinstance using the given endpoint as upstream. The endpoint is expected to be a complete absolute URL, e.g. "http://localhost:9600/actuator/clock".- Parameters:
endpoint- the actuator URL to connect to- Returns:
- a new instance of
ActorClockActuator
-
getCurrentClock
ActorClockActuator.Response getCurrentClock() -
addTime
-