Package io.activej.common.recycle
Interface Recyclable
public interface Recyclable
Since some objects (mainly
ByteBufs) have
the notion of ownership and recyclability, a way to recognize them is needed.
This interface marks objects that need to be recycled at the end of their lifetime,
so that some generic abstraction (such as CSP) could try to recycle some object that it consumes.-
Method Summary
Modifier and TypeMethodDescriptionvoidrecycle()Free some resource that this object possesses, e.g.
-
Method Details
-
recycle
void recycle()Free some resource that this object possesses, e.g. return itself to the pool, etc.
-