You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PooledRef should only directly expose the methods that are most relevant to the majority of users: release(), invalidate() (to a lesser extent, but that's the logical place to put it) and poolable().
Additional methods that return metrics about the PooledRef should be hidden away in a separate interface. Since these can be viewed as metadata for the reference (which could grow beyond simple metrics to include some state), I suggest PooledRefMetadata.
The metadata would be accessible through a fourth method, PooledRef#metadata().
In order to limit garbage, internal concrete implementations of PooledRef should directly implement PooledRefMetadata and have metadata() return a view of this.
The text was updated successfully, but these errors were encountered:
PooledRef
should only directly expose the methods that are most relevant to the majority of users:release()
,invalidate()
(to a lesser extent, but that's the logical place to put it) andpoolable()
.Additional methods that return metrics about the
PooledRef
should be hidden away in a separate interface. Since these can be viewed as metadata for the reference (which could grow beyond simple metrics to include some state), I suggestPooledRefMetadata
.The metadata would be accessible through a fourth method,
PooledRef#metadata()
.In order to limit garbage, internal concrete implementations of
PooledRef
should directly implementPooledRefMetadata
and havemetadata()
return a view ofthis
.The text was updated successfully, but these errors were encountered: