当前位置: 首页>>代码示例>>Java>>正文


Java CloseHelper.quietClose方法代码示例

本文整理汇总了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);
}
 
开发者ID:canepat,项目名称:Helios,代码行数:17,代码来源:Helios.java

示例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);
    }
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:25,代码来源:ReplaySession.java

示例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);
    }
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:23,代码来源:RecordingWriter.java

示例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);

}
 
开发者ID:deeplearning4j,项目名称:nd4j,代码行数:22,代码来源:ParameterServerNode.java

示例5: close

import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
    writeBatchingBuffer();
    journalling.flush();

    CloseHelper.quietClose(journalling);
    DirectBufferAllocator.free(batchingBuffer);
}
 
开发者ID:canepat,项目名称:Helios,代码行数:10,代码来源:JournalWriter.java

示例6: close

import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
    running.set(false);
    journallerThread.join();

    CloseHelper.quietClose(journalHandler);
}
 
开发者ID:canepat,项目名称:Helios,代码行数:9,代码来源:JournalProcessor.java

示例7: close

import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
    CloseHelper.quietClose(journalling);
    DirectBufferAllocator.free(readBuffer1.byteBuffer());
    DirectBufferAllocator.free(readBuffer2.byteBuffer());
}
 
开发者ID:canepat,项目名称:Helios,代码行数:8,代码来源:JournalReader.java

示例8: close

import org.agrona.CloseHelper; //导入方法依赖的package包/类
@Override
public void close() throws Exception
{
    running = false;
    processorThread.join();

    CloseHelper.quietClose(inputSubscription);
}
 
开发者ID:canepat,项目名称:Helios,代码行数:9,代码来源:InputMessageProcessor.java

示例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);
}
 
开发者ID:canepat,项目名称:Helios,代码行数:15,代码来源:HeliosService.java

示例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);
}
 
开发者ID:benalexau,项目名称:rpc-bench,代码行数:8,代码来源:BenchServer.java

示例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);
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:12,代码来源:ArchiveConductor.java

示例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);
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:13,代码来源:ChannelEndpointStatusTest.java

示例13: closeEverything

import org.agrona.CloseHelper; //导入方法依赖的package包/类
@After
public void closeEverything()
{
    CloseHelper.quietClose(clientB);
    CloseHelper.quietClose(clientA);

    driver.close();

    driverContext.deleteAeronDirectory();
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:11,代码来源:CounterTest.java

示例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();
    }
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:13,代码来源:PubAndSubTest.java

示例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);
}
 
开发者ID:real-logic,项目名称:aeron,代码行数:13,代码来源:SpySimulatedConnectionTest.java


注:本文中的org.agrona.CloseHelper.quietClose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。