Class Link<E>
- java.lang.Object
-
- org.glassfish.grizzly.connectionpool.Link<E>
-
- Type Parameters:
E-
public final class Link<E> extends Object
The object represents an element, from which a minimalisticChainis built. It is possible to attach or detach a Link from aChain. When the Link is attached it contains a pointers to the previous and the next Links in theChain, otherwise, if the Link is detached - the pointers values are null. If a Link is attached - it can only be attached to oneChain.- Author:
- Alexey Stashok
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAttachmentTimeStamp()EgetValue()booleanisAttached()StringtoString()
-
-
-
Constructor Detail
-
Link
public Link(E value)
Construct the Link holding given value object.- Parameters:
value- an object the Link represents.
-
-
Method Detail
-
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.
-
-