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 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

      public Link(E value)
      Construct the Link holding given value object.
      Parameters:
      value - an object the Link represents.
  • Method Details

    • getValue

      public E 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 a Chain.
    • isAttached

      public boolean isAttached()
      Returns:
      true if the Link is currently attached to a Chain or false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object