Class ClientManager<K,​V>

  • All Implemented Interfaces:
    IClientManager<K,​V>

    public class ClientManager<K,​V>
    extends java.lang.Object
    implements IClientManager<K,​V>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V borrowClient​(K node)
      get a client V for node K from the IClientManager.
      void clear​(K node)
      clear all clients for node K.
      void close()
      close IClientManager, which means closing all clients for all nodes.
      org.apache.commons.pool2.KeyedObjectPool<K,​V> getPool()  
      void returnClient​(K node, V client)
      return a client V for node K to the ClientManager.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPool

        public org.apache.commons.pool2.KeyedObjectPool<K,​V> getPool()
      • returnClient

        public void returnClient​(K node,
                                 V client)
        return a client V for node K to the ClientManager.

        Note: We do not define this interface in IClientManager to make you aware that the return of a client is automatic whenever a particular client is used.

      • close

        public void close()
        Description copied from interface: IClientManager
        close IClientManager, which means closing all clients for all nodes.
        Specified by:
        close in interface IClientManager<K,​V>