Class ClientPool

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public final class ClientPool
    extends java.lang.Object
    implements java.io.Closeable
    Keeps a collection of all clients (FileSystem) returned. The main reason for this is to build cleanup clients.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      alluxio.client.file.FileSystem getClient()
      Returns a FileSystem client.
      alluxio.client.file.FileSystem getClient​(alluxio.client.file.FileSystemContext context)
      Returns a FileSystem client using a specific context.
      • Methods inherited from class java.lang.Object

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

      • getClient

        public alluxio.client.file.FileSystem getClient()
                                                 throws java.io.IOException
        Returns a FileSystem client. This client does not need to be closed directly, but can be closed by calling close() on this object.
        Returns:
        a FileSystem client
        Throws:
        java.io.IOException
      • getClient

        public alluxio.client.file.FileSystem getClient​(alluxio.client.file.FileSystemContext context)
                                                 throws java.io.IOException
        Returns a FileSystem client using a specific context. This client does not need to be closed directly, but can be closed by calling close() on this object.
        Parameters:
        context - the FileSystemContext to use
        Returns:
        a FileSystem client
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException