public final class IdentityManagerMultiplexerImpl extends DatabaseMultiplexer<IdentityManager> implements IdentityManagerMultiplexer
Service requests may originate from more than one external server, so this implementation is threadsafe.
| Modifier and Type | Field and Description |
|---|---|
private static IdentityManagerMultiplexer |
instance
Singleton instance of this class
|
| Modifier | Constructor and Description |
|---|---|
private |
IdentityManagerMultiplexerImpl()
Default constructor which initializes the resources needed for this
multiplexer to service identity manager requests.
|
| Modifier and Type | Method and Description |
|---|---|
protected IdentityManager |
getWorker(Database database)
Get the identity manager which is associated with the given database.
|
static void |
initialize()
Initialize the identity multiplexer for this server instance.
|
java.lang.Long |
nextPrimaryKey(int database,
java.lang.String table)
Return the next primary key for the specified table.
|
void |
reclaimKeys(int database,
java.lang.Long[] keys)
Inform the identity manager that the given primary keys can be reused.
|
getMultiplexID, lookupWorkerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMultiplexIDprivate static IdentityManagerMultiplexer instance
private IdentityManagerMultiplexerImpl()
public static void initialize()
This method enforces the singleton pattern.
java.lang.IllegalStateException - if this method is invoked more than once.public java.lang.Long nextPrimaryKey(int database,
java.lang.String table)
throws PersistenceException
nextPrimaryKey in interface IdentityManagerMultiplexerdatabase - 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.public void reclaimKeys(int database,
java.lang.Long[] keys)
reclaimKeys in interface IdentityManagerMultiplexerdatabase - Value that uniquely identifies the target database on the
remote server.keys - Keys for reuse.protected IdentityManager getWorker(Database database)
getWorker in class DatabaseMultiplexer<IdentityManager>database - Physical database with which the returned worker is associated.