Package com.unboundid.ldap.sdk
Class ServerSetBlacklistManager
java.lang.Object
com.unboundid.ldap.sdk.ServerSetBlacklistManager
@Mutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class ServerSetBlacklistManager
extends Object
This class provides a mechanism for maintaining a blacklist of servers that
have recently been found to be unacceptable for use by a server set. Server
sets that use this class can temporarily avoid trying to access servers that
may be experiencing problems.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of the servers currently on the blacklist.booleanisBlacklisted(ObjectPair<String, Integer> hostPort) Indicates whether the specified server is currently on the blacklist.booleanisBlacklisted(String host, int port) Indicates whether the specified server is currently on the blacklist.booleanisEmpty()Indicates whether the blacklist is currently empty.voidshutDown()Shuts down the blacklist manager.intsize()Retrieves the number of servers currently on the blacklist.toString()Retrieves a string representation of this server set blacklist manager.voidtoString(StringBuilder buffer) Appends a string representation of this server set blacklist manager to the provided buffer.
-
Method Details
-
isEmpty
Indicates whether the blacklist is currently empty.- Returns:
trueif the blacklist is currently empty, orfalseif it contains at least one server.
-
size
Retrieves the number of servers currently on the blacklist.- Returns:
- The number of servers currently on the blacklist.
-
getBlacklistedServers
Retrieves a list of the servers currently on the blacklist.- Returns:
- A list of the servers currently on the blacklist.
-
isBlacklisted
Indicates whether the specified server is currently on the blacklist.- Parameters:
host- The address of the server for which to make the determination. It must not benull.port- The port of the server for which to make the determination. It must be between 1 and 65535, inclusive.- Returns:
trueif the server is on the blacklist, orfalseif not.
-
isBlacklisted
Indicates whether the specified server is currently on the blacklist.- Parameters:
hostPort- AnObjectPaircontaining the address and port of the server for which to make the determination. It must not benull.- Returns:
trueif the server is on the blacklist, orfalseif not.
-
shutDown
Shuts down the blacklist manager. -
toString
Retrieves a string representation of this server set blacklist manager. -
toString
Appends a string representation of this server set blacklist manager to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended.
-