@Mutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ServerSetBlacklistManager extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.Set<ObjectPair<java.lang.String,java.lang.Integer>> |
getBlacklistedServers()
Retrieves a list of the servers currently on the blacklist.
|
boolean |
isBlacklisted(ObjectPair<java.lang.String,java.lang.Integer> hostPort)
Indicates whether the specified server is currently on the blacklist.
|
boolean |
isBlacklisted(java.lang.String host,
int port)
Indicates whether the specified server is currently on the blacklist.
|
boolean |
isEmpty()
Indicates whether the blacklist is currently empty.
|
void |
shutDown()
Shuts down the blacklist manager.
|
int |
size()
Retrieves the number of servers currently on the blacklist.
|
java.lang.String |
toString()
Retrieves a string representation of this server set blacklist manager.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this server set blacklist manager to the
provided buffer.
|
public boolean isEmpty()
true
if the blacklist is currently empty, or false
if it contains at least one server.public int size()
@NotNull public java.util.Set<ObjectPair<java.lang.String,java.lang.Integer>> getBlacklistedServers()
public boolean isBlacklisted(@NotNull java.lang.String host, int port)
host
- The address of the server for which to make the
determination. It must not be null
.port
- The port of the server for which to make the determination.
It must be between 1 and 65535, inclusive.true
if the server is on the blacklist, or false
if not.public boolean isBlacklisted(@NotNull ObjectPair<java.lang.String,java.lang.Integer> hostPort)
hostPort
- An ObjectPair
containing the address and port of
the server for which to make the determination. It must
not be null
.true
if the server is on the blacklist, or false
if not.public void shutDown()
@NotNull public java.lang.String toString()
toString
in class java.lang.Object