@InterfaceAudience.Public public class QuotaRetriever extends Object implements Closeable, Iterable<QuotaSettings>
Modifier and Type | Class and Description |
---|---|
private class |
QuotaRetriever.Iter |
Modifier and Type | Field and Description |
---|---|
private Queue<QuotaSettings> |
cache |
private Connection |
connection
Connection to use.
|
private boolean |
isManagedConnection
Should QutoaRetriever manage the state of the connection, or leave it be.
|
private static org.slf4j.Logger |
LOG |
private ResultScanner |
scanner |
private Table |
table |
Constructor and Description |
---|
QuotaRetriever() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
(package private) void |
init(org.apache.hadoop.conf.Configuration conf,
Scan scan) |
(package private) void |
init(Connection conn,
Scan scan) |
Iterator<QuotaSettings> |
iterator() |
QuotaSettings |
next() |
static QuotaRetriever |
open(org.apache.hadoop.conf.Configuration conf)
Open a QuotaRetriever with no filter, all the quota settings will be returned.
|
static QuotaRetriever |
open(org.apache.hadoop.conf.Configuration conf,
QuotaFilter filter)
Open a QuotaRetriever with the specified filter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
private static final org.slf4j.Logger LOG
private final Queue<QuotaSettings> cache
private ResultScanner scanner
private Connection connection
private boolean isManagedConnection
QuotaRetriever()
void init(org.apache.hadoop.conf.Configuration conf, Scan scan) throws IOException
IOException
void init(Connection conn, Scan scan) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public QuotaSettings next() throws IOException
IOException
public Iterator<QuotaSettings> iterator()
iterator
in interface Iterable<QuotaSettings>
public static QuotaRetriever open(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- Configuration object to use.IOException
- if a remote or network exception occurspublic static QuotaRetriever open(org.apache.hadoop.conf.Configuration conf, QuotaFilter filter) throws IOException
conf
- Configuration object to use.filter
- the QuotaFilterIOException
- if a remote or network exception occursCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.