@Test public void testFreeReferences() throws Exception { exportTask.freeReferences(); assertEquals(0, atomicInteger.get()); verify(byteBuffs[0]).release(); atomicInteger = new AtomicInteger(2); exportTask = new UpdateExportTask(connection, byteBuffs, partitions, atomicInteger); exportTask.freeReferences(); assertEquals(1, atomicInteger.get()); verify(byteBuffs[0]).release(); }
public void freeReferences() { if (messagesReleaseCounter.decrementAndGet() == 0) { for (ByteBuf generatedMessage : generatedMessages) { if (generatedMessage != null) { generatedMessage.release(); } } } }
UpdateExportTask implements Callable<Void> { public void freeReferences() { if (messagesReleaseCounter.decrementAndGet() == 0) { for (ByteBuf generatedMessage : generatedMessages) { if (generatedMessage != null) { generatedMessage.release(); } } } } }
UpdateExportTask implements Callable<Void> { public void freeReferences() { if (messagesReleaseCounter.decrementAndGet() == 0) { for (ByteBuf generatedMessage : generatedMessages) { if (generatedMessage != null) { generatedMessage.release(); } } } } UpdateExportTask(SxpConnection connection, ByteBuf[] generatedMessages,
            BiFunction<SxpConnection, SxpBindingFilter, ByteBuf>[] partitions, AtomicInteger messagesReleaseCounter); }
UpdateExportTask implements Callable<Void> { public void freeReferences() { if (messagesReleaseCounter.decrementAndGet() == 0) { for (ByteBuf generatedMessage : generatedMessages) { if (generatedMessage != null) { generatedMessage.release(); } } } } UpdateExportTask(SxpConnection connection, ByteBuf[] generatedMessages,
            BiFunction<SxpConnection, SxpBindingFilter, ByteBuf>[] partitions, AtomicInteger messagesReleaseCounter); SxpConnection getConnection(); @Override Void call(); void freeReferences(); }
UpdateExportTask implements Callable<Void> { public void freeReferences() { if (messagesReleaseCounter.decrementAndGet() == 0) { for (ByteBuf generatedMessage : generatedMessages) { if (generatedMessage != null) { generatedMessage.release(); } } } } UpdateExportTask(SxpConnection connection, ByteBuf[] generatedMessages,
            BiFunction<SxpConnection, SxpBindingFilter, ByteBuf>[] partitions, AtomicInteger messagesReleaseCounter); SxpConnection getConnection(); @Override Void call(); void freeReferences();  }