Modifier | Constructor and Description |
---|---|
protected |
AbstractReference(T obj) |
Modifier and Type | Method and Description |
---|---|
T |
get()
Get an object.
|
long |
getAge()
Get the age of this
Reference since it's creation. |
int |
getReferenceCount()
Get the current number of references retained to this object.
|
void |
release()
Decrease the reference count by 1.
|
void |
release(int decr)
Decrease the reference count by incr amount.
|
void |
retain()
Increase reference count by 1.
|
void |
retain(int incr)
Increase reference count by incr amount.
|
String |
toString() |
protected AbstractReference(T obj)
public long getAge()
Reference
Reference
since it's creation.getAge
in interface Reference<T extends Recyclable>
Reference
was created.public int getReferenceCount()
Reference
getReferenceCount
in interface Reference<T extends Recyclable>
public void retain()
Reference
retain
in interface Reference<T extends Recyclable>
public void retain(int incr)
Reference
retain
in interface Reference<T extends Recyclable>
incr
- the amount to increment the reference count.public void release()
Reference
release
in interface Reference<T extends Recyclable>
public void release(int decr)
Reference
release
in interface Reference<T extends Recyclable>
decr
- the amount to decrement the reference count.public T get()
Supplier
get
in interface Supplier<T extends Recyclable>
Copyright © 2016. All rights reserved.