@InterfaceAudience.Private public class ConnectionCache extends java.lang.Object
| Constructor and Description |
|---|
ConnectionCache(Configuration conf,
UserProvider userProvider,
int cleanInterval,
int maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
Admin |
getAdmin()
Caller doesn't close the admin afterwards.
|
java.lang.String |
getEffectiveUser()
Get the current thread local effective user
|
RegionLocator |
getRegionLocator(byte[] tableName)
Retrieve a regionLocator for the table.
|
Table |
getTable(java.lang.String tableName)
Caller closes the table afterwards.
|
void |
setEffectiveUser(java.lang.String user)
Set the current thread local effective user
|
void |
shutdown()
Called when cache is no longer needed so that it can perform cleanup operations
|
public ConnectionCache(Configuration conf,
UserProvider userProvider,
int cleanInterval,
int maxIdleTime)
throws java.io.IOException
java.io.IOExceptionpublic void setEffectiveUser(java.lang.String user)
public java.lang.String getEffectiveUser()
public void shutdown()
public Admin getAdmin() throws java.io.IOException
java.io.IOExceptionpublic Table getTable(java.lang.String tableName) throws java.io.IOException
java.io.IOExceptionpublic RegionLocator getRegionLocator(byte[] tableName) throws java.io.IOException
java.io.IOException