Search in sources :

Example 1 with AgentInvoker

use of org.agrona.concurrent.AgentInvoker in project aeron by real-logic.

the class SharedModeArchiveConductor method onStart.

public void onStart() {
    super.onStart();
    replayerAgentInvoker = new AgentInvoker(errorHandler, ctx.errorCounter(), replayer);
    recorderAgentInvoker = new AgentInvoker(errorHandler, ctx.errorCounter(), recorder);
    replayerAgentInvoker.start();
    recorderAgentInvoker.start();
}
Also used : AgentInvoker(org.agrona.concurrent.AgentInvoker)

Example 2 with AgentInvoker

use of org.agrona.concurrent.AgentInvoker in project Aeron by real-logic.

the class SharedModeArchiveConductor method onStart.

public void onStart() {
    super.onStart();
    replayerAgentInvoker = new AgentInvoker(errorHandler, ctx.errorCounter(), replayer);
    recorderAgentInvoker = new AgentInvoker(errorHandler, ctx.errorCounter(), recorder);
    replayerAgentInvoker.start();
    recorderAgentInvoker.start();
}
Also used : AgentInvoker(org.agrona.concurrent.AgentInvoker)

Example 3 with AgentInvoker

use of org.agrona.concurrent.AgentInvoker in project Aeron by real-logic.

the class ConsensusModuleContextTest method beforeEach.

@BeforeEach
void beforeEach() {
    final Aeron.Context aeronContext = mock(Aeron.Context.class);
    when(aeronContext.subscriberErrorHandler()).thenReturn(new RethrowingErrorHandler());
    final AgentInvoker conductorInvoker = mock(AgentInvoker.class);
    final Aeron aeron = mock(Aeron.class);
    when(aeron.context()).thenReturn(aeronContext);
    when(aeron.conductorAgentInvoker()).thenReturn(conductorInvoker);
    context = new ConsensusModule.Context().clusterDir(clusterDir).aeron(aeron).errorCounter(mock(AtomicCounter.class)).ingressChannel("must be specified").replicationChannel("must be specified").moduleStateCounter(mock(Counter.class)).electionStateCounter(mock(Counter.class)).clusterNodeRoleCounter(mock(Counter.class)).commitPositionCounter(mock(Counter.class)).controlToggleCounter(mock(Counter.class)).snapshotCounter(mock(Counter.class)).timedOutClientCounter(mock(Counter.class));
}
Also used : AgentInvoker(org.agrona.concurrent.AgentInvoker) AtomicCounter(org.agrona.concurrent.status.AtomicCounter) Counter(io.aeron.Counter) AtomicCounter(org.agrona.concurrent.status.AtomicCounter) Aeron(io.aeron.Aeron) RethrowingErrorHandler(io.aeron.RethrowingErrorHandler) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AgentInvoker (org.agrona.concurrent.AgentInvoker)3 Aeron (io.aeron.Aeron)1 Counter (io.aeron.Counter)1 RethrowingErrorHandler (io.aeron.RethrowingErrorHandler)1 AtomicCounter (org.agrona.concurrent.status.AtomicCounter)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1