java.util.concurrent.LinkedBlockingDeque.removeFirst()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(172)

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

LinkedBlockingDeque.removeFirst介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: osmandapp/Osmand

@Override
   public T remove() {
   return super.removeFirst();
   }
}

代码示例来源:origin: robovm/robovm

/**
 * Retrieves and removes the head of the queue represented by this deque.
 * This method differs from {@link #poll poll} only in that it throws an
 * exception if this deque is empty.
 *
 * <p>This method is equivalent to {@link #removeFirst() removeFirst}.
 *
 * @return the head of the queue represented by this deque
 * @throws NoSuchElementException if this deque is empty
 */
public E remove() {
  return removeFirst();
}

代码示例来源:origin: google/ExoPlayer

/**
 * Asserts that the source has notified its listener of a single timeline change.
 *
 * @return The new {@link Timeline}.
 */
public Timeline assertTimelineChange() {
 timeline = timelines.removeFirst();
 assertNoTimelineChange();
 return timeline;
}

代码示例来源:origin: azkaban/azkaban

/**
 * Remove snapshots to maintain reporting interval
 *
 * @param metricName Name of the metric
 * @param firstAllowedDate End date of the interval
 */
private void cleanUsingTime(final String metricName, final Date firstAllowedDate) {
 if (this.historyListMapping.containsKey(metricName)
   && this.historyListMapping.get(metricName) != null) {
  synchronized (this.historyListMapping.get(metricName)) {
   InMemoryHistoryNode firstNode = this.historyListMapping.get(metricName).peekFirst();
   long localCopyOfTimeWindow = 0;
   // go ahead for clean up using latest possible value of interval
   // any interval change will not affect on going clean up
   synchronized (this) {
    localCopyOfTimeWindow = this.timeWindow;
   }
   // removing objects older than Interval time from firstAllowedDate
   while (firstNode != null
     && TimeUnit.MILLISECONDS
     .toMillis(firstAllowedDate.getTime() - firstNode.getTimestamp().getTime())
     > localCopyOfTimeWindow) {
    this.historyListMapping.get(metricName).removeFirst();
    firstNode = this.historyListMapping.get(metricName).peekFirst();
   }
  }
 }
}

代码示例来源:origin: google/ExoPlayer

/**
 * Asserts that the source has notified its listener of a single timeline change.
 *
 * @return The new {@link Timeline}.
 */
public Timeline assertTimelineChange() {
 timeline = timelines.removeFirst();
 assertNoTimelineChange();
 return timeline;
}

代码示例来源:origin: apache/flume

synchronized (queue) {
 while (!putList.isEmpty()) {
  if (!queue.addTail(putList.removeFirst())) {
   StringBuilder msg = new StringBuilder();
   msg.append("Queue add failed, this shouldn't be able to ");

代码示例来源:origin: apache/flume

if (puts > 0) {
 while (!putList.isEmpty()) {
  if (!queue.offer(putList.removeFirst())) {
   throw new RuntimeException("Queue add failed, this shouldn't be able to happen");

代码示例来源:origin: ibinti/bugvm

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: MobiVM/robovm

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Retrieves and removes the head of the queue represented by this deque.
 * This method differs from {@link #poll poll} only in that it throws an
 * exception if this deque is empty.
 *
 * <p>This method is equivalent to {@link #removeFirst() removeFirst}.
 *
 * @return the head of the queue represented by this deque
 * @throws NoSuchElementException if this deque is empty
 */
public E remove() {
  return removeFirst();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * @throws NoSuchElementException {@inheritDoc}
 */
public E pop() {
  return removeFirst();
}

代码示例来源:origin: apache/uima-uimaj

@Override
public MultiThreadInfo removeFirst() {
 MultiThreadInfo e = super.removeFirst();
 System.out.println(x(e, "removing First"));
 return e;
}

代码示例来源:origin: mayconbordin/streaminer

public void add(T num) {
  long lastDelta = 0l;
  if (deltaSeries.remainingCapacity() == 0) {
   lastDelta = deltaSeries.removeFirst();
  }
  long newInput = num.longValue();
  long newDelta = newInput - lastInput;
  lastInput = newInput;
  deltaSeries.addLast(newDelta);
  sumDelta += newDelta - lastDelta;
}

代码示例来源:origin: eoinsha/JavaPhoenixChannels

private void rejoin() throws IOException {
  this.sendJoin();
  while (!this.pushBuffer.isEmpty()) {
    this.pushBuffer.removeFirst().send();
  }
}

相关文章

微信公众号

最新文章

更多