@Deprecated public abstract class ReferenceLifecycle<T> extends Object
Component
in order to limit the amount of
retained memory in ComponentTree.
ReferenceLifecycle is the base class from which all the Reference types should inherit.
A ReferenceLifecycle should take care of both acquiring a resource given its Reference
and releasing/caching it for future use.Constructor and Description |
---|
ReferenceLifecycle()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected <T> Diff<T> |
acquireDiff(T previousValue,
T nextValue)
Deprecated.
|
protected abstract T |
onAcquire(ComponentContext context,
Reference<T> reference)
Deprecated.
|
protected void |
onRelease(ComponentContext context,
T value,
Reference<T> reference)
Deprecated.
|
protected void |
releaseDiff(Diff diff)
Deprecated.
|
boolean |
shouldReferenceUpdate(Reference<T> previous,
Reference<T> next)
Deprecated.
|
protected boolean |
shouldUpdate(Reference<T> previous,
Reference<T> next)
Deprecated.
|
protected abstract T onAcquire(ComponentContext context, Reference<T> reference)
protected void onRelease(ComponentContext context, T value, Reference<T> reference)
protected final <T> Diff<T> acquireDiff(T previousValue, T nextValue)
protected void releaseDiff(Diff diff)