Package alluxio.master
Class ClientPool
- java.lang.Object
-
- alluxio.master.ClientPool
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
@ThreadSafe public final class ClientPool extends java.lang.Object implements java.io.CloseableKeeps 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 voidclose()alluxio.client.file.FileSystemgetClient()Returns aFileSystemclient.alluxio.client.file.FileSystemgetClient(alluxio.client.file.FileSystemContext context)Returns aFileSystemclient using a specific context.
-
-
-
Method Detail
-
getClient
public alluxio.client.file.FileSystem getClient() throws java.io.IOExceptionReturns aFileSystemclient. This client does not need to be closed directly, but can be closed by callingclose()on this object.- Returns:
- a
FileSystemclient - Throws:
java.io.IOException
-
getClient
public alluxio.client.file.FileSystem getClient(alluxio.client.file.FileSystemContext context) throws java.io.IOExceptionReturns aFileSystemclient using a specific context. This client does not need to be closed directly, but can be closed by callingclose()on this object.- Parameters:
context- the FileSystemContext to use- Returns:
- a
FileSystemclient - Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-