io.aeron.Aeron.conductorAgentInvoker()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中io.aeron.Aeron.conductorAgentInvoker()方法的一些代码示例,展示了Aeron.conductorAgentInvoker()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Aeron.conductorAgentInvoker()方法的具体详情如下:
包路径:io.aeron.Aeron
类名称:Aeron
方法名:conductorAgentInvoker

Aeron.conductorAgentInvoker介绍

[英]Get the AgentInvoker for the client conductor.
[中]获取客户端指挥的AgentInvoker。

代码示例

代码示例来源:origin: real-logic/aeron

@Before
public void before()
{
  when(mockAeron.conductorAgentInvoker()).thenReturn(mock(AgentInvoker.class));
  when(mockEgressPublisher.sendEvent(any(), anyLong(), anyInt(), any(), any())).thenReturn(TRUE);
  when(mockLogPublisher.appendSessionClose(any(), anyLong(), anyLong())).thenReturn(TRUE);
  when(mockLogPublisher.appendSessionOpen(any(), anyLong(), anyLong())).thenReturn(128L);
  when(mockLogPublisher.appendClusterAction(anyLong(), anyLong(), anyLong(), any(ClusterAction.class)))
    .thenReturn(TRUE);
  when(mockAeron.addPublication(anyString(), anyInt())).thenReturn(mockResponsePublication);
  when(mockAeron.addSubscription(anyString(), anyInt())).thenReturn(mock(Subscription.class));
  when(mockAeron.addSubscription(anyString(), anyInt(), eq(null), any(UnavailableImageHandler.class)))
    .thenReturn(mock(Subscription.class));
  when(mockResponsePublication.isConnected()).thenReturn(TRUE);
}

代码示例来源:origin: real-logic/aeron

AeronArchive(
  final Context ctx,
  final ControlResponsePoller controlResponsePoller,
  final ArchiveProxy archiveProxy,
  final RecordingDescriptorPoller recordingDescriptorPoller,
  final long controlSessionId)
{
  context = ctx;
  aeron = ctx.aeron();
  aeronClientInvoker = aeron.conductorAgentInvoker();
  idleStrategy = ctx.idleStrategy();
  messageTimeoutNs = ctx.messageTimeoutNs();
  lock = ctx.lock();
  nanoClock = aeron.context().nanoClock();
  this.controlResponsePoller = controlResponsePoller;
  this.archiveProxy = archiveProxy;
  this.recordingDescriptorPoller = recordingDescriptorPoller;
  this.controlSessionId = controlSessionId;
}

代码示例来源:origin: real-logic/aeron

if (null == aeron.conductorAgentInvoker())

代码示例来源:origin: real-logic/aeron

ArchiveConductor(final Archive.Context ctx)
{
  super("archive-conductor", ctx.countedErrorHandler());
  this.ctx = ctx;
  aeron = ctx.aeron();
  aeronAgentInvoker = aeron.conductorAgentInvoker();
  driverAgentInvoker = ctx.mediaDriverAgentInvoker();
  epochClock = ctx.epochClock();
  archiveDir = ctx.archiveDir();
  archiveDirChannel = ctx.archiveDirChannel();
  maxConcurrentRecordings = ctx.maxConcurrentRecordings();
  maxConcurrentReplays = ctx.maxConcurrentReplays();
  connectTimeoutMs = TimeUnit.NANOSECONDS.toMillis(ctx.connectTimeoutNs());
  final ChannelUri controlChannelUri = ChannelUri.parse(ctx.controlChannel());
  controlChannelUri.put(CommonContext.SPARSE_PARAM_NAME, Boolean.toString(ctx.controlTermBufferSparse()));
  controlSubscription = aeron.addSubscription(controlChannelUri.toString(), ctx.controlStreamId(), this, null);
  localControlSubscription = aeron.addSubscription(
    ctx.localControlChannel(), ctx.localControlStreamId(), this, null);
  recordingEventsProxy = new RecordingEventsProxy(
    aeron.addExclusivePublication(ctx.recordingEventsChannel(), ctx.recordingEventsStreamId()));
  cachedEpochClock.update(epochClock.time());
  catalog = ctx.catalog();
  markFile = ctx.archiveMarkFile();
}

代码示例来源:origin: real-logic/aeron

if (null == aeron.conductorAgentInvoker())

代码示例来源:origin: real-logic/aeron

this.highMemberId = ClusterMember.highMemberId(clusterMembers);
aeronClientInvoker = aeron.conductorAgentInvoker();
aeronClientInvoker.invoke();

代码示例来源:origin: real-logic/aeron

aeronClientInvoker = aeron.conductorAgentInvoker();
idleStrategy = ctx.idleStrategy();
messageTimeoutNs = ctx.messageTimeoutNs();

代码示例来源:origin: real-logic/artio

public Agent conductorAgent()
{
  final AgentInvoker invoker = aeron.conductorAgentInvoker();
  if (invoker == null)
  {
    return null;
  }
  return invoker.agent();
}

代码示例来源:origin: real-logic/artio

private void invokeAeronConductor()
{
  final AgentInvoker invoker = aeron.conductorAgentInvoker();
  if (invoker != null)
  {
    invoker.invoke();
  }
}

代码示例来源:origin: real-logic/artio

private void initFramer(
  final EngineConfiguration configuration, final FixCounters fixCounters, final int replaySessionId)
{
  framerContext = new FramerContext(
    configuration,
    fixCounters,
    engineContext,
    errorHandler,
    replayImage("replay", replaySessionId),
    replayImage("slow-replay", replaySessionId),
    timers,
    aeron.conductorAgentInvoker(),
    recordingCoordinator);
}

代码示例来源:origin: io.aeron/aeron-all

AeronArchive(
  final Context ctx,
  final ControlResponsePoller controlResponsePoller,
  final ArchiveProxy archiveProxy,
  final RecordingDescriptorPoller recordingDescriptorPoller,
  final long controlSessionId)
{
  context = ctx;
  aeron = ctx.aeron();
  aeronClientInvoker = aeron.conductorAgentInvoker();
  idleStrategy = ctx.idleStrategy();
  messageTimeoutNs = ctx.messageTimeoutNs();
  lock = ctx.lock();
  nanoClock = aeron.context().nanoClock();
  this.controlResponsePoller = controlResponsePoller;
  this.archiveProxy = archiveProxy;
  this.recordingDescriptorPoller = recordingDescriptorPoller;
  this.controlSessionId = controlSessionId;
}

代码示例来源:origin: io.aeron/aeron-all

if (null == aeron.conductorAgentInvoker())

代码示例来源:origin: real-logic/artio

private void catchIndexUp(final AeronArchive aeronArchive, final ErrorHandler errorHandler)
  final AgentInvoker aeronInvoker = aeronArchive.context().aeron().conductorAgentInvoker();

代码示例来源:origin: io.aeron/aeron-all

ArchiveConductor(final Archive.Context ctx)
{
  super("archive-conductor", ctx.countedErrorHandler());
  this.ctx = ctx;
  aeron = ctx.aeron();
  aeronAgentInvoker = aeron.conductorAgentInvoker();
  driverAgentInvoker = ctx.mediaDriverAgentInvoker();
  epochClock = ctx.epochClock();
  archiveDir = ctx.archiveDir();
  archiveDirChannel = ctx.archiveDirChannel();
  maxConcurrentRecordings = ctx.maxConcurrentRecordings();
  maxConcurrentReplays = ctx.maxConcurrentReplays();
  connectTimeoutMs = TimeUnit.NANOSECONDS.toMillis(ctx.connectTimeoutNs());
  final ChannelUri controlChannelUri = ChannelUri.parse(ctx.controlChannel());
  controlChannelUri.put(CommonContext.SPARSE_PARAM_NAME, Boolean.toString(ctx.controlTermBufferSparse()));
  controlSubscription = aeron.addSubscription(controlChannelUri.toString(), ctx.controlStreamId(), this, null);
  localControlSubscription = aeron.addSubscription(
    ctx.localControlChannel(), ctx.localControlStreamId(), this, null);
  recordingEventsProxy = new RecordingEventsProxy(
    aeron.addExclusivePublication(ctx.recordingEventsChannel(), ctx.recordingEventsStreamId()));
  cachedEpochClock.update(epochClock.time());
  catalog = ctx.catalog();
  markFile = ctx.archiveMarkFile();
}

代码示例来源:origin: io.aeron/aeron-all

if (null == aeron.conductorAgentInvoker())

代码示例来源:origin: io.aeron/aeron-all

this.highMemberId = ClusterMember.highMemberId(clusterMembers);
aeronClientInvoker = aeron.conductorAgentInvoker();
aeronClientInvoker.invoke();

代码示例来源:origin: real-logic/artio

aeronArchive,
configuration,
aeron.conductorAgentInvoker(),
configuration.archiverIdleStrategy());

代码示例来源:origin: io.aeron/aeron-all

aeronClientInvoker = aeron.conductorAgentInvoker();
idleStrategy = ctx.idleStrategy();
messageTimeoutNs = ctx.messageTimeoutNs();

相关文章