ReferenceCounted Type — netty Architecture
Architecture documentation for the ReferenceCounted type/interface in ReferenceCounted.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f61f6bdf_90d8_18da_8ceb_7f19c97e34f7["ReferenceCounted"] aff95386_1a15_3f50_51b8_49315e84ace9["ReferenceCounted.java"] f61f6bdf_90d8_18da_8ceb_7f19c97e34f7 -->|defined in| aff95386_1a15_3f50_51b8_49315e84ace9 style f61f6bdf_90d8_18da_8ceb_7f19c97e34f7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/ReferenceCounted.java lines 32–77
public interface ReferenceCounted {
/**
* Returns the reference count of this object. If {@code 0}, it means this object has been deallocated.
*/
int refCnt();
/**
* Increases the reference count by {@code 1}.
*/
ReferenceCounted retain();
/**
* Increases the reference count by the specified {@code increment}.
*/
ReferenceCounted retain(int increment);
/**
* Records the current access location of this object for debugging purposes.
* If this object is determined to be leaked, the information recorded by this operation will be provided to you
* via {@link ResourceLeakDetector}. This method is a shortcut to {@link #touch(Object) touch(null)}.
*/
ReferenceCounted touch();
/**
* Records the current access location of this object with an additional arbitrary information for debugging
* purposes. If this object is determined to be leaked, the information recorded by this operation will be
* provided to you via {@link ResourceLeakDetector}.
*/
ReferenceCounted touch(Object hint);
/**
* Decreases the reference count by {@code 1} and deallocates this object if the reference count reaches at
* {@code 0}.
*
* @return {@code true} if and only if the reference count became {@code 0} and this object has been deallocated
*/
boolean release();
/**
* Decreases the reference count by the specified {@code decrement} and deallocates this object if the reference
* count reaches at {@code 0}.
*
* @return {@code true} if and only if the reference count became {@code 0} and this object has been deallocated
*/
boolean release(int decrement);
}
Source
Frequently Asked Questions
What is the ReferenceCounted type?
ReferenceCounted is a type/interface in the netty codebase, defined in common/src/main/java/io/netty/util/ReferenceCounted.java.
Where is ReferenceCounted defined?
ReferenceCounted is defined in common/src/main/java/io/netty/util/ReferenceCounted.java at line 32.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free