List of usage examples for io.netty.util ReferenceCounted refCnt
int refCnt();
From source file:io.grpc.alts.internal.NettyTsiHandshakerTest.java
License:Apache License
@After public void teardown() { for (ReferenceCounted reference : references) { reference.release(reference.refCnt()); } }
From source file:org.atmosphere.nettosphere.BridgeRuntime.java
License:Apache License
@Override public void channelRead(final ChannelHandlerContext ctx, final Object messageEvent) throws URISyntaxException, IOException { try {/*w ww . j a v a 2 s . c om*/ handleMessageEvent(ctx, messageEvent); } finally { if (messageEvent instanceof ReferenceCounted) { ReferenceCounted refMsg = (ReferenceCounted) messageEvent; if (refMsg.refCnt() > 0) refMsg.release(); } } }
From source file:org.lanternpowered.server.network.message.ReferenceCountedMessage.java
License:MIT License
@Override public int refCnt() { final ReferenceCounted referenceCounted = getReferenceCounted(); return referenceCounted == null ? 1 : referenceCounted.refCnt(); }