本文整理了Java中java.util.concurrent.LinkedBlockingDeque.offerFirst()
方法的一些代码示例,展示了LinkedBlockingDeque.offerFirst()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkedBlockingDeque.offerFirst()
方法的具体详情如下:
包路径:java.util.concurrent.LinkedBlockingDeque
类名称:LinkedBlockingDeque
方法名:offerFirst
暂无
代码示例来源:origin: osmandapp/Osmand
@Override
public boolean offer(T t) {
return super.offerFirst(t);
}
代码示例来源:origin: robovm/robovm
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: h2oai/h2o-2
private static void bbFree(ByteBuffer bb) {
bbstats(BBFREE);
bb.clear();
BBS.offerFirst(bb);
}
代码示例来源:origin: zendesk/maxwell
LOGGER.warn("Assuming new transaction at unexpected event:" + event);
queue.offerFirst(event);
rowBuffer = getTransactionRows(event);
break;
代码示例来源:origin: matomo-org/piwik-sdk-android
public void requeue(List<Event> events) {
for (Event e : events) {
mQueue.offerFirst(e);
}
}
代码示例来源:origin: andforce/iBeebo
@Override
public boolean offer(Runnable runnable) {
return super.offerFirst(runnable);
}
}, sThreadFactory, new ThreadPoolExecutor.DiscardOldestPolicy() {
代码示例来源:origin: andforce/iBeebo
@Override
public boolean offer(Runnable runnable) {
return super.offerFirst(runnable);
}
代码示例来源:origin: matomo-org/matomo-sdk-android
public void requeue(List<Event> events) {
for (Event e : events) {
mQueue.offerFirst(e);
}
}
代码示例来源:origin: org.apidesign.bck2brwsr/emul
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: jtulach/bck2brwsr
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: ibinti/bugvm
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: MobiVM/robovm
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* @throws IllegalStateException {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
public void addFirst(E e) {
if (!offerFirst(e))
throw new IllegalStateException("Deque full");
}
代码示例来源:origin: at.molindo/molindo-utils
/**
* @param put
* object back on stack
*/
public void put(T o) {
if (o != null && reset(o)) {
_stack.offerFirst(o);
}
}
代码示例来源:origin: com.github.tntim96/rhino
private void returnDocumentBuilderToPool(DocumentBuilder db) {
try {
db.reset();
documentBuilderPool.offerFirst(db);
} catch (UnsupportedOperationException e) {
// document builders that don't support reset() can't be pooled
}
}
代码示例来源:origin: saki4510t/libcommon
/**
* 実行中のタスクが終了後開放する
*/
public void releaseSelf() {
mIsRunning = false;
if (!mFinished) {
mRequestQueue.clear();
mRequestQueue.offerFirst(obtain(REQUEST_TASK_QUIT, 0, 0, null));
}
}
代码示例来源:origin: tony19/logback-android
@Test
public void reAddsEventAtTheFrontOfTheDequeWhenTransmissionFails() throws Exception {
// given
mockOneSuccessfulSocketConnection();
doThrow(new IOException()).when(objectWriter).write(anyObject());
appender.start();
awaitStartOfEventDispatching();
// when
appender.append("some event");
// then
verify(deque, timeout(TIMEOUT).atLeastOnce()).offerFirst("some event");
}
内容来源于网络,如有侵权,请联系作者删除!