本文整理了Java中io.advantageous.qbit.queue.Queue.stop
方法的一些代码示例,展示了Queue.stop
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Queue.stop
方法的具体详情如下:
包路径:io.advantageous.qbit.queue.Queue
类名称:Queue
方法名:stop
暂无
代码示例来源:origin: advantageous/qbit
/**
* Stop the queue.
*/
@Override
public void stop() {
queue.stop();
}
}
代码示例来源:origin: advantageous/qbit
/**
* Stop the adapter.
*/
public void stop() {
queue.ifPresent(actualQueue -> actualQueue.stop());
}
}
代码示例来源:origin: advantageous/qbit
/**
* Stop the client bundle.
*/
@SuppressWarnings("Convert2streamapi")
public void stop() {
if (debug) {
logger.debug(ServiceBundleImpl.class.getName(), "::stop()");
}
methodQueue.stop();
for (Stoppable service : servicesToStop) {
service.stop();
}
try {
responseQueue.stop();
} catch (Exception ex) {
logger.debug("", ex);
}
try {
webResponseQueue.stop();
} catch (Exception ex) {
logger.debug("", ex);
}
if (systemManager != null) systemManager.serviceShutDown();
}
代码示例来源:origin: advantageous/qbit
private void initQueue() {
/* Clean it up. */
queue.ifPresent(actualQueue -> {
try {
actualQueue.stop();
} catch (Exception ex) {
logger.debug("Unable to stop queue", ex);
}
});
receiveQueue.ifPresent(actualReceiveQueue -> {
try {
actualReceiveQueue.stop();
} catch (Exception ex) {
logger.debug("Unable to shut down receive queue", ex);
}
});
try {
this.queue = Optional.of(queueSupplier.get());
this.queue.ifPresent(actualQueue -> receiveQueue = Optional.of(actualQueue.receiveQueue()));
} catch (Exception ex) {
logger.error("Unable to create queue with queue supplier", ex);
this.queue = Optional.empty();
this.receiveQueue = Optional.empty();
}
}
代码示例来源:origin: advantageous/qbit
@Override
public void receive(T item) {
/**
* The total number of onNext signals sent by a Publisher to a Subscriber
* MUST be less than or equal to the total number of
* elements requested by that Subscriber's Subscription at all times.
*/
waitForCountsIfNeeded();
/** If a Subscription is cancelled its Subscriber
* MUST eventually stop being signaled.*/
if (stop) {
queue.stop();
}
subscriber.onNext(item);
sendThisMany--;
}
代码示例来源:origin: advantageous/qbit
@Override
public void receive(T item) {
/**
* The total number of onNext signals sent by a Publisher to a Subscriber
* MUST be less than or equal to the total number of
* elements requested by that Subscriber's Subscription at all times.
*/
waitForCountsIfNeeded();
/** If a Subscription is cancelled its Subscriber
* MUST eventually stop being signaled.*/
if (stop) {
queue.stop();
}
subscription.subscriber.onNext(item);
subscription.requestCount--;
}
代码示例来源:origin: advantageous/qbit
@After
public void tearDown() {
queue.stop();
}
}
代码示例来源:origin: advantageous/qbit
@After
public void tearDown() throws Exception {
personQueue.stop();
}
代码示例来源:origin: advantageous/qbit
@After
public void tearDown() throws Exception {
personQueue.stop();
}
代码示例来源:origin: advantageous/qbit
@Override
public void stop() {
started.set(false);
try {
if (requestQueue != null) requestQueue.stop();
} catch (Exception ex) {
if (debug) logger.debug("Unable to stop request queue", ex);
}
try {
if (responseQueue != null) responseQueue.stop();
} catch (Exception ex) {
if (debug) logger.debug("Unable to stop response queues", ex);
}
if (systemManager != null) {
this.systemManager.serviceShutDown();
this.systemManager.unregisterService(this);
}
if (!(service instanceof EventManager)) {
if (joinEventManager) {
serviceContext().eventManager().leaveEventBus(this);
}
}
eventManager.ifPresent(em -> em.leaveEventBus(BaseServiceQueueImpl.this));
}
代码示例来源:origin: advantageous/qbit
@After
public void tearDown() throws Exception {
personQueue.stop();
}
代码示例来源:origin: io.advantageous.qbit/qbit-core
/**
* Stop the queue.
*/
@Override
public void stop() {
queue.stop();
}
}
代码示例来源:origin: com.github.advantageous/qbit-core
/**
* Stop the queue.
*/
@Override
public void stop() {
queue.stop();
}
}
代码示例来源:origin: io.advantageous.qbit/qbit-core
/**
* Stop the adapter.
*/
public void stop() {
queue.ifPresent(actualQueue -> actualQueue.stop());
}
}
代码示例来源:origin: com.github.advantageous/qbit-core
/**
* Stop the adapter.
*/
public void stop() {
queue.ifPresent(actualQueue -> actualQueue.stop());
}
}
代码示例来源:origin: advantageous/qbit
@Test
public void integrationTest() throws Exception {
final Queue<String> queue = QueueBuilder.queueBuilder().build();
final QueueToStreamUnicast<String> stream = new QueueToStreamUnicast<>(queue);
final Iterator<String> iterator = toIteratorWithRequestsPipelineSize(stream, 10);
final SendQueue<String> sendQueue = queue.sendQueue();
for (int index = 0; index < 100; index++) {
sendQueue.send("" + index);
}
sendQueue.flushSends();
Thread thread = new Thread(() -> {
Sys.sleep(500);
queue.stop();
});
thread.start();
int i = 0;
while (iterator.hasNext()) {
String item = iterator.next();
assertEquals("" + i, item);
puts("" + i, item);
i++;
}
assertEquals(100, i);
}
代码示例来源:origin: io.advantageous.qbit/qbit-core
/**
* Stop the client bundle.
*/
@SuppressWarnings("Convert2streamapi")
public void stop() {
if (debug) {
logger.debug(ServiceBundleImpl.class.getName(), "::stop()");
}
methodQueue.stop();
for (Stoppable service : servicesToStop) {
service.stop();
}
try {
responseQueue.stop();
} catch (Exception ex) {
logger.debug("", ex);
}
try {
webResponseQueue.stop();
} catch (Exception ex) {
logger.debug("", ex);
}
if (systemManager != null) systemManager.serviceShutDown();
}
代码示例来源:origin: io.advantageous.qbit/qbit-core
@Override
public void receive(T item) {
/**
* The total number of onNext signals sent by a Publisher to a Subscriber
* MUST be less than or equal to the total number of
* elements requested by that Subscriber's Subscription at all times.
*/
waitForCountsIfNeeded();
/** If a Subscription is cancelled its Subscriber
* MUST eventually stop being signaled.*/
if (stop) {
queue.stop();
}
subscription.subscriber.onNext(item);
subscription.requestCount--;
}
代码示例来源:origin: io.advantageous.qbit/qbit-core
@Override
public void receive(T item) {
/**
* The total number of onNext signals sent by a Publisher to a Subscriber
* MUST be less than or equal to the total number of
* elements requested by that Subscriber's Subscription at all times.
*/
waitForCountsIfNeeded();
/** If a Subscription is cancelled its Subscriber
* MUST eventually stop being signaled.*/
if (stop) {
queue.stop();
}
subscriber.onNext(item);
sendThisMany--;
}
代码示例来源:origin: advantageous/qbit
queue.stop();
内容来源于网络,如有侵权,请联系作者删除!