@Test public void testDiscard() { AtomContext ctx = new AtomContext(genAtoms(10, 10)); assertNotNull(ctx); assertNotNull(ctx.atoms); assertEquals(1, ctx.atoms.count); assertNotNull(ctx.atoms.object); RefCount<List<ByteBuffer>> atoms = ctx.atoms; provider.discard(ctx); assertNull(ctx.atoms); assertEquals(0, atoms.count); assertNull(atoms.object); }
void discard() { atoms.deref(); atoms = null; }
AtomContext implements BaggageContext { void discard() { atoms.deref(); atoms = null; } }
AtomContext implements BaggageContext { void discard() { atoms.deref(); atoms = null; } AtomContext();   AtomContext(List<ByteBuffer> atoms);   AtomContext(RefCount<List<ByteBuffer>> atoms); }
AtomContext implements BaggageContext { void discard() { atoms.deref(); atoms = null; } AtomContext();   AtomContext(List<ByteBuffer> atoms);   AtomContext(RefCount<List<ByteBuffer>> atoms); AtomContext branch(); AtomContext merge(AtomContext other); int serializedSize(); List<ByteBuffer> getUnmodifiableAtoms(); List<ByteBuffer> getModifiableAtoms(); }
AtomContext implements BaggageContext { void discard() { atoms.deref(); atoms = null; } AtomContext();   AtomContext(List<ByteBuffer> atoms);   AtomContext(RefCount<List<ByteBuffer>> atoms); AtomContext branch(); AtomContext merge(AtomContext other); int serializedSize(); List<ByteBuffer> getUnmodifiableAtoms(); List<ByteBuffer> getModifiableAtoms();  }