public interface IdentityManagerMultiplexer extends RemoteMultiplexer<java.lang.String>
RemoteIdentityManager
invokes the methods of this interface on a local proxy for a remote object,
in order to access the identity management services of the remote P2J
server which is authoritative for a particular database.
Since the remote P2J server may manage multiple databases, but only a single instance of an implementor of this interface will be available at any given remote server, identity management service requests must be multiplexed by database. For this reason, each of the methods defined by this interface accepts an integer ID, which uniquely identifies the target database at the remote server.
The database ID to use for a particular physical database is determined by
calling RemoteMultiplexer.getMultiplexID(Object)
. This is
the responsibility of the RemoteIdentityManager
and must be
done before any dirty read management service is requested.
This interface effectively mirrors that of the IdentityManager API
,
except for the additional database multiplex identifier which is the first
parameter to each method.
Modifier and Type | Method and Description |
---|---|
java.io.Serializable |
nextPrimaryKey(int database,
java.lang.String table)
Return the next primary key for the specified table.
|
void |
reclaimKeys(int database,
java.io.Serializable[] keys)
Inform the identity manager that the given primary keys can be reused.
|
getMultiplexID
java.io.Serializable nextPrimaryKey(int database, java.lang.String table) throws PersistenceException
database
- Value that uniquely identifies the target database on the
remote server.table
- Table for which the next primary key will be returned.PersistenceException
- if there is an error determining the next primary key ID.void reclaimKeys(int database, java.io.Serializable[] keys)
database
- Value that uniquely identifies the target database on the
remote server.keys
- Keys for reuse.