Class Link<E>
java.lang.Object
org.glassfish.grizzly.connectionpool.Link<E>
- Type Parameters:
E-
The object represents an element, from which a minimalistic
Chain is built.
It is possible to attach or detach a Link from a Chain. When
the Link is attached it contains a pointers to the previous and
the next Links in the Chain, otherwise, if the Link
is detached - the pointers values are null.
If a Link is attached - it can only be attached to one Chain.- Author:
- Alexey Stashok
-
Constructor Details
-
Link
Construct the Link holding given value object.- Parameters:
value- an object the Link represents.
-
-
Method Details
-
getValue
- Returns:
- the value held by this
Link.
-
getAttachmentTimeStamp
public long getAttachmentTimeStamp()- Returns:
- the timestamp, that represents the time (in milliseconds) when
the Link was attached to a
Chain, or -1 if the Link is not currently attached to aChain.
-
isAttached
public boolean isAttached()- Returns:
- true if the Link is currently attached to a
Chainor false otherwise.
-
toString
-