Methods Summary |
---|
public void | decrementReferenceCount()
synchronized( this ){
ref_count--;
// System.out.println( "" + this + ": rc=" + ref_count );
if ( ref_count == 0 ){
basis.returnToPool();
}
}
|
public org.gudy.azureus2.core3.util.ReferenceCountedDirectByteBuffer | duplicate(int offset, int length)
ByteBuffer duplicate = getBufferInternal().duplicate();
duplicate.position( duplicate.position() + offset );
duplicate.limit( duplicate.position() + length );
ReferenceCountedDirectByteBuffer res = new ReferenceCountedDirectByteBufferDuplicate( duplicate );
return( res );
|
public int | getReferenceCount()
return( ref_count );
|
public void | incrementReferenceCount()
synchronized( this ){
ref_count++;
// System.out.println( "" + this + ": rc=" + ref_count );
}
|
public void | returnToPool()
decrementReferenceCount();
|