All Packages Class Hierarchy This Package Previous Next Index
Interface oracle.jdbc.driver.ClientDataSupport
- public interface ClientDataSupport
An object that supports storing and retrieving client data objects using
associated keys. It serves as a convenience for caching client data.
The objects used as keys must provide a deterministic implementation of
the hashCode
and equals
methods.
Objects implementing ClientDataSupport treat the client data values
and keys as opaque objects. Accordingly, the values and keys stored do
not affect the ClientDataSupport object's definition of the
hashCode
or equals
methods.
As this service is provided by the implementor purely as a
convenience to the client, the implementor does not guarantee that the
mappings are retained. In particular the mappings are not persistent and
will be empty after deserialization or in a new clone. The implementor
may silently release the mappings for other reasons as well, e.g. to
reclaim storage.
-
getClientData(Object)
-
Returns the client data value mapped to the specified key.
-
removeClientData(Object)
- Removes the specified key and any associated client data.
-
setClientData(Object, Object)
- Maps the specified client data value to the specified key.
getClientData
public abstract Object getClientData(Object key)
- Returns the client data value mapped to the specified key.
Returns null if the key is not mapped to any value.
- Parameters:
- key
key - whose associated value is to be returned.
- Returns:
- the value mapped to the specified key, or null if there is no
mapping for this key.
- Throws: NullPointerException
- if the specified key is null.
setClientData
public abstract Object setClientData(Object key,
Object value)
- Maps the specified client data value to the specified key. Neither
the key nor the value can be null. If there is an existing mapping
for this key, the old value is replaced.
- Parameters:
- key
key - with which the specified client data value is to be associated.
- value
client - data value to be associated with the specified key.
- Returns:
- previous client data value associated with specified key,
or null if there was no previous association.
- Throws: NullPointerException
- if the specified key or value is null.
removeClientData
public abstract Object removeClientData(Object key)
- Removes the specified key and any associated client data.
- Parameters:
- key
key - which is to be removed along with its associated value
- Returns:
- previous client data value associated with specified key,
or null if there was no previous association.
- Throws: NullPointerException
- if the specified key is null.
All Packages Class Hierarchy This Package Previous Next Index