本文整理汇总了Java中org.agrona.CloseHelper.quietClose方法的典型用法代码示例。如果您正苦于以下问题:Java CloseHelper.quietClose方法的具体用法?Java CloseHelper.quietClose怎么用?Java CloseHelper.quietClose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.agrona.CloseHelper
的用法示例。
在下文中一共展示了CloseHelper.quietClose方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close()
{
CloseHelper.quietClose(reporter);
gatewayList.forEach(CloseHelper::quietClose);
gatewayList.clear();
gatewaySubscriptionRepository.clear();
serviceList.forEach(CloseHelper::quietClose);
serviceList.clear();
serviceSubscriptionRepository.clear();
CloseHelper.quietClose(aeron);
CloseHelper.quietClose(driver);
}
示例2: closeOnError
import org.agrona.CloseHelper; //导入方法依赖的package包/类
private void closeOnError(final Throwable ex, final String errorMessage)
{
state = State.INACTIVE;
CloseHelper.quietClose(replayPublication);
if (null != cursor)
{
cursor.close();
}
if (!controlSession.isDone())
{
controlSession.sendResponse(
correlationId,
ControlResponseCode.ERROR,
errorMessage,
threadLocalControlResponseProxy);
}
if (ex != null)
{
LangUtil.rethrowUnchecked(ex);
}
}
示例3: newRecordingSegmentFile
import org.agrona.CloseHelper; //导入方法依赖的package包/类
private void newRecordingSegmentFile()
{
final File file = new File(archiveDir, segmentFileName(recordingId, segmentIndex));
RandomAccessFile recordingFile = null;
try
{
recordingFile = new RandomAccessFile(file, "rw");
recordingFile.setLength(segmentFileLength + DataHeaderFlyweight.HEADER_LENGTH);
recordingFileChannel = recordingFile.getChannel();
if (forceWrites && null != archiveDirChannel)
{
archiveDirChannel.force(forceMetadata);
}
}
catch (final IOException ex)
{
CloseHelper.quietClose(recordingFile);
close();
LangUtil.rethrowUnchecked(ex);
}
}
示例4: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
/**
* Stop the server
* @throws Exception
*/
@Override
public void close() throws Exception {
if (subscriber != null) {
for (int i = 0; i < subscriber.length; i++) {
if (subscriber[i] != null) {
subscriber[i].close();
}
}
}
if (server != null)
server.stop();
if (mediaDriver != null)
CloseHelper.quietClose(mediaDriver);
if (aeron != null)
CloseHelper.quietClose(aeron);
}
示例5: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
writeBatchingBuffer();
journalling.flush();
CloseHelper.quietClose(journalling);
DirectBufferAllocator.free(batchingBuffer);
}
示例6: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
running.set(false);
journallerThread.join();
CloseHelper.quietClose(journalHandler);
}
示例7: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
CloseHelper.quietClose(journalling);
DirectBufferAllocator.free(readBuffer1.byteBuffer());
DirectBufferAllocator.free(readBuffer2.byteBuffer());
}
示例8: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
running = false;
processorThread.join();
CloseHelper.quietClose(inputSubscription);
}
示例9: close
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close()
{
snapshotTimer.close();
timerWheelRunning.set(false);
timerExecutor.shutdown();
CloseHelper.quietClose(svcInputProcessor);
gwResponseProcessorList.forEach(CloseHelper::quietClose);
eventProcessorList.forEach(CloseHelper::quietClose);
CloseHelper.quietClose(journalProcessor);
CloseHelper.quietClose(replicaProcessor);
CloseHelper.quietClose(serviceProcessor);
}
示例10: shutdown
import org.agrona.CloseHelper; //导入方法依赖的package包/类
public void shutdown() throws InterruptedException {
CloseHelper.quietClose(subscription);
CloseHelper.quietClose(publication);
CloseHelper.quietClose(aeron);
CloseHelper.quietClose(ctx);
CloseHelper.quietClose(driver);
}
示例11: postSessionsClose
import org.agrona.CloseHelper; //导入方法依赖的package包/类
protected void postSessionsClose()
{
if (!ctx.ownsAeronClient())
{
CloseHelper.close(localControlSubscription);
CloseHelper.close(controlSubscription);
}
CloseHelper.quietClose(catalog);
CloseHelper.quietClose(archiveDirChannel);
}
示例12: closeEverything
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@After
public void closeEverything()
{
CloseHelper.quietClose(clientC);
CloseHelper.quietClose(clientB);
CloseHelper.quietClose(clientA);
driverB.close();
driverA.close();
IoUtil.delete(new File(ROOT_DIR), false);
}
示例13: closeEverything
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@After
public void closeEverything()
{
CloseHelper.quietClose(clientB);
CloseHelper.quietClose(clientA);
driver.close();
driverContext.deleteAeronDirectory();
}
示例14: closeEverything
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@After
public void closeEverything()
{
CloseHelper.quietClose(subscribingClient);
CloseHelper.quietClose(publishingClient);
CloseHelper.quietClose(driver);
if (null != context.aeronDirectory())
{
context.deleteAeronDirectory();
}
}
示例15: after
import org.agrona.CloseHelper; //导入方法依赖的package包/类
@After
public void after()
{
CloseHelper.quietClose(publication);
CloseHelper.quietClose(subscription);
CloseHelper.quietClose(spy);
CloseHelper.quietClose(client);
CloseHelper.quietClose(driver);
IoUtil.delete(driverContext.aeronDirectory(), true);
}