本文整理了Java中java.util.concurrent.LinkedBlockingDeque.push()
方法的一些代码示例,展示了LinkedBlockingDeque.push()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkedBlockingDeque.push()
方法的具体详情如下:
包路径:java.util.concurrent.LinkedBlockingDeque
类名称:LinkedBlockingDeque
方法名:push
暂无
代码示例来源:origin: jersey/jersey
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: jersey/jersey
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: org.glassfish.jersey.core/jersey-client
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: org.jboss.seam.transaction/seam-transaction
public void push(T t) {
if (stack.get() == null) {
stack.set(new LinkedBlockingDeque<T>());
}
stack.get().push(t);
}
代码示例来源:origin: org.apache.commons/commons-jcs-core
/**
* Perhaps the composite cache itself should be the observable object. It doesn't make much of a
* difference. There are some problems with region by region shutdown. Some auxiliaries are
* global. They will need to track when every region has shutdown before doing things like
* closing the socket with a lateral.
* <p>
* @param observer
*/
@Override
public void registerShutdownObserver( IShutdownObserver observer )
{
if (!shutdownObservers.contains(observer))
{
shutdownObservers.push( observer );
}
else
{
log.warn("Shutdown observer added twice " + observer);
}
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: org.glassfish.jersey.bundles/jaxrs-ri
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: KostyaSha/yet-another-docker-plugin
/**
* Register a new client shutdown hook.
*
* @param shutdownHook client shutdown hook.
*/
/* package */ void registerShutdownHook(final ShutdownHook shutdownHook) {
checkNotClosed();
shutdownHooks.push(new WeakReference<JerseyClient.ShutdownHook>(shutdownHook, shReferenceQueue));
cleanUpShutdownHooks();
}
代码示例来源:origin: dhanji/sitebricks
boolean awaitLogin() {
try {
if (!loginSuccess.await(10L, TimeUnit.SECONDS)) {
disconnectAbnormally("Timed out waiting for login response");
throw new RuntimeException("Timed out waiting for login response");
}
return isLoggedIn();
} catch (InterruptedException e) {
errorStack.push(new Error(null, e.getMessage(), wireTrace.list()));
throw new RuntimeException("Interruption while awaiting server login", e);
}
}
代码示例来源:origin: nateyolles/publick-sling-blog
times.push(Long.valueOf(currentTimeMillis));
final long cutoff = currentTimeMillis - (SECONDS * 1000);
Long oldest = times.peekLast();
代码示例来源:origin: dhanji/sitebricks
private void disconnectAbnormally(String message) {
try {
halt();
// Disconnect abnormally. The user code should reconnect using the mail client.
errorStack.push(new Error(completions.poll(), message, wireTrace.list()));
idler.disconnectAsync();
} finally {
disconnected();
}
}
代码示例来源:origin: dhanji/sitebricks
getWireTrace()
});
errorStack.push(new Error(completions.peek(), message, wireTrace.list()));
final CommandCompletion completion = completions.peek();
String errorMsg = "Some messages in the batch could not be fetched for user " + config.getUsername();
errorStack.push(new Error(null, "No completion found!", wireTrace.list()));
代码示例来源:origin: Netflix/spectator
@Test
public void testMethodValueHelpers() {
Registry r = newRegistry(true, 10000);
LinkedBlockingDeque<String> q1 = new LinkedBlockingDeque<>();
r.methodValue("queueSize", q1, "size");
Id id = r.createId("queueSize");
assertGaugeValue(r, id, 0.0);
q1.push("foo");
assertGaugeValue(r, id, 1.0);
}
代码示例来源:origin: Netflix/spectator
@Test
public void testCollectionSizeHelpers() {
Registry r = newRegistry(true, 10000);
LinkedBlockingDeque<String> q1 = new LinkedBlockingDeque<>();
LinkedBlockingDeque<String> q2 = r.collectionSize("queueSize", q1);
Assertions.assertSame(q1, q2);
Id id = r.createId("queueSize");
assertGaugeValue(r, id, 0.0);
q2.push("foo");
assertGaugeValue(r, id, 1.0);
}
代码示例来源:origin: apache/activemq-artemis
failureQueue.push(true);
代码示例来源:origin: jamorham/xDrip-plus
UserError.Log.d(TAG, "Re-adding: " + unit.text);
synchronized (commandQueue) {
commandQueue.push(unit);
代码示例来源:origin: NightscoutFoundation/xDrip
UserError.Log.d(TAG, "Re-adding: " + unit.text);
synchronized (commandQueue) {
commandQueue.push(unit);
代码示例来源:origin: jamorham/xDrip-plus
UserError.Log.d(TAG, "Re-adding: " + unit.text);
synchronized (commandQueue) {
commandQueue.push(unit);
内容来源于网络,如有侵权,请联系作者删除!