Class ServerAffinity


  • public final class ServerAffinity
    extends java.lang.Object
    This class provides a data structure for holding information about an affinity to a particular backend server instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerAffinity​(BackendServer backendServer)
      Creates a server affinity for the provided backend server.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getAffinityEstablishedTime()
      Retrieves a timestamp indicating when the affinity was established.
      BackendServer getBackendServer()
      Retrieves the backend server to which the affinity is established.
      java.lang.String toString()
      Retrieves a string representation of this server affinity object.
      void toString​(java.lang.StringBuilder buffer)
      Appends a string representation of this server affinity object to the provided buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServerAffinity

        public ServerAffinity​(BackendServer backendServer)
        Creates a server affinity for the provided backend server.
        Parameters:
        backendServer - The backend server with which the affinity is to be associated.
    • Method Detail

      • getBackendServer

        public BackendServer getBackendServer()
        Retrieves the backend server to which the affinity is established.
        Returns:
        The backend server to which the affinity is established.
      • getAffinityEstablishedTime

        public long getAffinityEstablishedTime()
        Retrieves a timestamp indicating when the affinity was established. The timestamp value will be the number of milliseconds since the epoch, in the same format returned by System.currentTimeMillis or Date.getTime.
        Returns:
        A timestamp indicating when the affinity was established.
      • toString

        public java.lang.String toString()
        Retrieves a string representation of this server affinity object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this server affinity object.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this server affinity object to the provided buffer.
        Parameters:
        buffer - The buffer to which the information should be appended.