com.lmax.disruptor.WaitStrategy.signalAllWhenBlocking()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(92)

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

WaitStrategy.signalAllWhenBlocking介绍

[英]Implementations should signal the waiting EventProcessors that the cursor has advanced.
[中]实现应该向等待的事件处理器发出光标已前进的信号。

代码示例

代码示例来源:origin: LMAX-Exchange/disruptor

@Override
public void alert()
{
  alerted = true;
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: LMAX-Exchange/disruptor

@Override
  public void signalAllWhenBlocking()
  {
    fallbackStrategy.signalAllWhenBlocking();
  }
}

代码示例来源:origin: LMAX-Exchange/disruptor

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(final long sequence)
{
  setAvailable(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: LMAX-Exchange/disruptor

/**
 * @see Sequencer#publish(long, long)
 */
@Override
public void publish(long lo, long hi)
{
  for (long l = lo; l <= hi; l++)
  {
    setAvailable(l);
  }
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: LMAX-Exchange/disruptor

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(long sequence)
{
  cursor.set(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: alibaba/jstorm

/**
 * @see Sequencer#publish(long, long)
 */
@Override
public void publish(long lo, long hi) {
  for (long l = lo; l <= hi; l++) {
    setAvailable(l);
  }
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: alibaba/jstorm

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(final long sequence) {
  setAvailable(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: alibaba/jstorm

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(long sequence) {
  cursor.set(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: LMAX-Exchange/disruptor

@Override
public void run()
{
  try
  {
    barrier.await();
    if (0 != sleepTime)
    {
      Thread.sleep(sleepTime);
    }
    sequence.incrementAndGet();
    waitStrategy.signalAllWhenBlocking();
  }
  catch (Exception e)
  {
    e.printStackTrace();
  }
}

代码示例来源:origin: com.lmax/disruptor

@Override
  public void signalAllWhenBlocking()
  {
    fallbackStrategy.signalAllWhenBlocking();
  }
}

代码示例来源:origin: com.lmax/disruptor

@Override
public void alert()
{
  alerted = true;
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: com.lmax/disruptor

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(final long sequence)
{
  setAvailable(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: com.lmax/disruptor

/**
 * @see Sequencer#publish(long, long)
 */
@Override
public void publish(long lo, long hi)
{
  for (long l = lo; l <= hi; l++)
  {
    setAvailable(l);
  }
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: com.lmax/disruptor

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(long sequence)
{
  cursor.set(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: xiaoguichao/mr

@Override
public void alert()
{
  alerted = true;
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: camunda/camunda-bpm-reactor

@Override
public void calm() {
 currentStrategy = slowWaitStrategy;
 fastWaitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: mzheravin/exchange-core

/**
 * @see Sequencer#publish(long, long)
 */
@Override
public void publish(long lo, long hi)
{
  for (long l = lo; l <= hi; l++)
  {
    setAvailable(l);
  }
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: mzheravin/exchange-core

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(final long sequence)
{
  setAvailable(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: xiaoguichao/mr

/**
 * @see Sequencer#publish(long)
 */
@Override
public void publish(final long sequence)
{
  setAvailable(sequence);
  waitStrategy.signalAllWhenBlocking();
}

代码示例来源:origin: xiaoguichao/mr

/**
 * @see Sequencer#publish(long, long)
 */
@Override
public void publish(long lo, long hi)
{
  for (long l = lo; l <= hi; l++)
  {
    setAvailable(l);
  }
  waitStrategy.signalAllWhenBlocking();
}

相关文章