public interface ConnectionRetrievalInfo
The connection retrieval info object also provides methods for equality and hash so that like-connections can be pooled efficiently.
The connection retrieval object supports Connection Labeling, a common mechanism for all types of connections. Represented as key/value pairs, connection labels are used for application-driven connection matching purposes.
ConnectionFactoryAdapter| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(java.lang.String key,
java.lang.String value)
Adds a connection label to this connection retrieval info object.
|
boolean |
equals(java.lang.Object other)
Checks whether this instance is equal to another.
|
ConnectionRetrievalInfo |
getCopyWithNoLabels()
Clones this connection retrieval object but removes all the
connection labels associated.
|
java.util.Properties |
getLabels()
Retrieves all the connection labels stored on this connection
retrieval info object.
|
int |
hashCode()
Returns the
hashCode of the
ConnectionRequestInfo. |
void |
removeLabel(java.lang.String key)
Removes the connection label with the given key from this connection
retrieval info object.
|
boolean equals(java.lang.Object other)
ConnectionRetrievalInfo is defined
specific to the type of object being pooled. The conditions for
equality are specific to the type of object being pooled.equals in class java.lang.Objecttrue if the two instances are equal;
false otherwise.int hashCode()
hashCode of the
ConnectionRequestInfo.hashCode in class java.lang.Objectvoid addLabel(java.lang.String key,
java.lang.String value)
throws UniversalConnectionPoolException
key - The key of the connection label to be added. Cannot
be null or an empty string.value - The value of the connection label to be added. Can be
null or an empty string.UniversalConnectionPoolException - If the key is null
or an empty string.void removeLabel(java.lang.String key)
throws UniversalConnectionPoolException
key - The key of the connection label to be removed. Cannot be
null or an empty string.UniversalConnectionPoolException - If the key is null
or an empty string.ConnectionRetrievalInfo getCopyWithNoLabels()
ConnectionRetrievalInfo object with all
connection labels removed.java.util.Properties getLabels()
java.util.Properties object storing all the stored
labels as key/value pairs. Returns null if there
are no stored labels on this connection retrieval info object.