| java.lang.Object org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase
DistributedVirtualDatabase | public class DistributedVirtualDatabase extends VirtualDatabase implements MessageListener,MulticastRequestListener,GroupMembershipListener(Code) | | A DistributedVirtualDatabase is a virtual database hosted by
several controllers. Communication between the controllers is achieved with
reliable multicast provided by Javagroups.
author: Emmanuel Cecchet author: Damian Arregui version: 1.0 |
Constructor Summary | |
public | DistributedVirtualDatabase(Controller controller, String name, String groupName, int maxConnections, boolean pool, int minThreads, int maxThreads, long maxThreadIdleTime, int sqlShortFormLength, long clientFailoverTimeoutInMs, boolean useStaticResultSetMetaData, String hederaPropertiesFile, boolean enforceTableExistenceIntoSchema) Creates a new DistributedVirtualDatabase instance. |
Method Summary | |
public void | addBackend(DatabaseBackend db) | public void | addBackendPerController(Member sender, List remoteBackends) Add a list of remote backends to the backendsPerController map. | public void | addOngoingActivitySuspension(Member controllerMember) Adds an ongoing activity suspension marker to the current list only if
suspension was not triggered by the local member. | public void | addRemoteControllerId(Member remoteControllerMembership, long remoteControllerId) Add a controller id to the controllerIds list. | public void | addRemoteControllerJmxName(Member remoteControllerMembership, String remoteControllerJmxName) Add a new controller name to the controllerJmxAddress list and refresh the
group membership. | public void | cancelMessage(Serializable msg) | public void | checkAndAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser) | public void | closePersistentConnection(String login, long persistentConnectionId) | public void | copyDump(String dumpName, String remoteControllerName) What this method does is really initiating the copy. | public void | copyLogFromCheckpoint(String dumpName, String controllerName) | public boolean | equals(Object other) Two virtual databases are equal if they have the same name, login and
password. | public void | failedMember(Member failed, GroupIdentifier gid, Member sender) | public void | failoverForPersistentConnection(long persistentConnectionId) | public void | failoverForTransaction(long currentTid) | protected void | finalize() Disconnect the channel and close it. | public void | flushGroupCommunicationMessagesLocally(long failedControllerId) Flushes all messages in the group communication locally, i.e. | public ArrayList | getAllMemberButUs() Returns the list of all members in the group except us. | public ArrayList | getAllMembers() Synchronized access to current group members. | public Hashtable | getBackendsPerController() Returns the local view of the backends in this virtual database across all
remote controllers. | public AbstractReliableGroupChannel | getChannel() | public Hashtable | getCleanupThreads() Returns the cleanupThreads value. | public long | getControllerId() Returns the controller ID. | public String | getControllerName() Returns the controllerName value. | public List | getControllerPersistentConnectionsRecovered(Long controllerId) Used by the ControllerFailureCleanupThread to cleanup following a
controller failure. | public Group | getCurrentGroup() Returns the currentGroup value. | final public Trace | getDistributedRequestLogger() Returns the distributedRequestLogger value. | protected String | getDistributionXml() Get the XML dump of the Distribution element. | public String | getGroupName() Returns the group name this virtual database belongs to.
a String value. | public MessageTimeouts | getMessageTimeouts() Returns the messageTimeouts value. | public MulticastRequestAdapter | getMulticastRequestAdapter() Return the group communication multicast request adapter. | public long | getNextConnectionId() | protected int | getNumberOfEnabledBackends() | public ControllerResultSet | getPreparedStatementGetMetaData(AbstractRequest request) | public RecoveryLog | getRecoveryLog() Returns the recovery log associated with this controller. | public RequestResultFailoverCache | getRequestResultFailoverCache() Returns the request result failover cache associated to this distributed
virtual database. | public VirtualDatabaseStaticMetaData | getStaticMetaData() Get the whole static metadata for this virtual database. | public List | getTransactionsRecovered(Long controllerId) Used by the ControllerFailureCleanupThread to cleanup following a
controller failure. | public void | groupComposition(Group g, IpAddress sender, int gmsStatus) | public Serializable | handleMessageMultiThreaded(Serializable msg, Member sender, Object handleMessageSingleThreadedResult) | public Object | handleMessageSingleThreaded(Serializable msg, Member sender) This method handle the scheduling part of the queries to be sure that the
query is scheduled in total order before letting other queries to execute. | public void | handleRemoteDisableBackendNotification(DatabaseBackend disabledBackend, Member sender) Update remote backends list after a backend disable notification has been
received. | public void | handleRemoteDisableBackendsNotification(ArrayList disabledBackendInfos, Member sender) Update remote backends list after a backend disable notification has been
received. | public void | initGlobalCounters(long controllerId) Initializes global counters based on recovery log.
Parameters: controllerId - this controller id, as allocated by hte groupcommunication. | public boolean | isAliveController(Long controllerId) | public boolean | isCompatibleBackend(BackendInfo backend) Check if the given backend definition is compatible with the backend
definitions of this distributed virtual database. | public boolean | isCompatibleDatabaseSchema(DatabaseSchema dbs) Return true if the provided schema is compatible with the existing schema
of this distributed virtual database. | public boolean | isDistributed() | public boolean | isLocalSender(Member sender) Returns true if the given member is ourselves. | public boolean | isProcessMacroBeforeBroadcast() Returns the processMacroBeforeBroadcast value. | protected boolean | isResyncing() | final public boolean | isVirtualDatabaseStarted() Returns the isVirtualDatabaseStarted value. | public void | joinGroup(boolean resyncRecoveryLog) Makes this virtual database join a virtual database group. | public void | joinMember(Member m, GroupIdentifier gid) | public void | networkPartition(GroupIdentifier gid, List mergedGroupCompositions) | public void | notifyPersistentConnectionFailover(Long controllerId, Long connectionId) Called by FailoverForPersistentConnection when a client reconnects
following a controller failure. | public void | notifyTransactionFailover(Long controllerId, Long transactionId) Called by FailoverForTransaction when a client reconnects following a
controller failure. | public void | openPersistentConnection(String login, long persistentConnectionId) | public void | quitChannel() Terminate the multicast request adapter and quit the Hedera channel. | public void | quitChannel(int level) Terminate the multicast request adapter and quit the Hedera channel. | public void | quitMember(Member m, GroupIdentifier gid) | public void | receive(Serializable msg) | public void | removeBackend(String backend) | public void | removeOngoingActivitySuspension(Member controllerMember) Removes an ongoing activity suspension marker from the current list only if
resuming was not triggered by the local member. | public void | sendLocalConfiguration(Member dest) | public Serializable | sendMessageToController(Member controllerMember, Serializable message, long timeout) Send a Message to a remote controller, referenced by its Member. | public MulticastResponse | sendMessageToControllers(ArrayList members, Serializable message, long timeout) Send a Message to a set of controllers. | public void | setGroupCheckpoint(String checkpointName, ArrayList groupMembers) Set a cluster-wide checkpoint relying on the implementation of
SetCheckpoint to atomically set the checkpoint on all controllers. | public void | setGroupName(String groupName) Sets the group name used by the controllers hosting this virtual database. | public String | setLogReplicationCheckpoint(Member controller) Sets an atomic (group-wide) checkpoint on local & target controllers
(refrenced by Name). | public void | setMessageTimeouts(MessageTimeouts messageTimeouts) Sets the messageTimeouts value. | public void | setProcessMacroBeforeBroadcast(boolean processMacros) Sets the processMacroBeforeBroadcast value. | public void | setRequestManager(RequestManager requestManager) Sets a new distributed request manager for this database. | public void | setShutdownCheckpoint() Sets an atomic (group-wide) checkpoint on all controllers, indicating that
this vdb has shutdown. | public void | shutdown(int level) | public void | transferBackend(String backend, String controllerDestination) | public void | transferDump(String dumpName, String remoteControllerName, boolean noCopy) | public String[] | viewControllerList() | public Hashtable | viewGroupBackends() | public boolean | waitForBlockAndSuspendInTotalOrder(Object request, boolean errorIfNotFound) Variant of the waitForTotalOrder() method, please refer to its
documentation. | public void | waitForGroupCommunicationMessagesLocallyFlushed(long failedControllerId) Waits for all messages in the group communication to be flushed locally. | public boolean | waitForTotalOrder(Object request, boolean errorIfNotFound) If we are executing in a distributed virtual database, we have to make sure
that we post the query in the queue following the total order. |
INCOMPATIBLE_CONFIGURATION | final public static long INCOMPATIBLE_CONFIGURATION(Code) | | Used by VirtualDatabaseConfiguration if a remote controller config is not
compatible
|
DistributedVirtualDatabase | public DistributedVirtualDatabase(Controller controller, String name, String groupName, int maxConnections, boolean pool, int minThreads, int maxThreads, long maxThreadIdleTime, int sqlShortFormLength, long clientFailoverTimeoutInMs, boolean useStaticResultSetMetaData, String hederaPropertiesFile, boolean enforceTableExistenceIntoSchema)(Code) | | Creates a new DistributedVirtualDatabase instance.
Parameters: controller - the controller we belong to Parameters: name - the virtual database name Parameters: groupName - the virtual database group name Parameters: maxConnections - maximum number of concurrent connections. Parameters: pool - should we use a pool of threads for handling connections? Parameters: minThreads - minimum number of threads in the pool Parameters: maxThreads - maximum number of threads in the pool Parameters: maxThreadIdleTime - maximum time a thread can remain idle before beingremoved from the pool. Parameters: clientFailoverTimeoutInMs - maximum time for clients to failover incase of a controller failure Parameters: sqlShortFormLength - maximum number of characters of an SQL statementto display in traces or exceptions Parameters: useStaticResultSetMetaData - true if DatabaseResultSetMetaData shoulduse static fields or try to fetch the metadata from the underlyingdatabase Parameters: hederaPropertiesFile - Hedera properties file defines the groupcommunication factory and its parameters |
addBackendPerController | public void addBackendPerController(Member sender, List remoteBackends)(Code) | | Add a list of remote backends to the backendsPerController map.
Parameters: sender - the membership identifying the remote controller Parameters: remoteBackends - remote controller backends |
addOngoingActivitySuspension | public void addOngoingActivitySuspension(Member controllerMember)(Code) | | Adds an ongoing activity suspension marker to the current list only if
suspension was not triggered by the local member.
Parameters: controllerMember - member which triggered the activity suspension |
addRemoteControllerId | public void addRemoteControllerId(Member remoteControllerMembership, long remoteControllerId)(Code) | | Add a controller id to the controllerIds list.
Parameters: remoteControllerMembership - the membership identifying the remotecontroller Parameters: remoteControllerId - remote controller identifier |
addRemoteControllerJmxName | public void addRemoteControllerJmxName(Member remoteControllerMembership, String remoteControllerJmxName)(Code) | | Add a new controller name to the controllerJmxAddress list and refresh the
group membership.
Parameters: remoteControllerMembership - the membership identifying the remotecontroller Parameters: remoteControllerJmxName - the JMX name of the remote controller |
equals | public boolean equals(Object other)(Code) | | Two virtual databases are equal if they have the same name, login and
password.
Parameters: other - an object a boolean value |
failedMember | public void failedMember(Member failed, GroupIdentifier gid, Member sender)(Code) | | See Also: org.continuent.hedera.gms.GroupMembershipListener.failedMember(org.continuent.hedera.common.Memberorg.continuent.hedera.common.GroupIdentifierorg.continuent.hedera.common.Member) |
flushGroupCommunicationMessagesLocally | public void flushGroupCommunicationMessagesLocally(long failedControllerId)(Code) | | Flushes all messages in the group communication locally, i.e. ensures that
all previously scheduled messages are processed.
Parameters: failedControllerId - controller whose suspected failure triggered theflush operation. |
getAllMemberButUs | public ArrayList getAllMemberButUs()(Code) | | Returns the list of all members in the group except us. Consider the value
read-only (do not alter).
the allMembersButUs field (never null). |
getAllMembers | public ArrayList getAllMembers()(Code) | | Synchronized access to current group members.
a clone of the list of all members (never null). |
getBackendsPerController | public Hashtable getBackendsPerController()(Code) | | Returns the local view of the backends in this virtual database across all
remote controllers.
a Hashtable<Member, List<DatabaseBackend>> |
getChannel | public AbstractReliableGroupChannel getChannel()(Code) | | Get the group channel used for group communications
a JChannel |
getCleanupThreads | public Hashtable getCleanupThreads()(Code) | | Returns the cleanupThreads value.
Returns the cleanupThreads. |
getControllerId | public long getControllerId()(Code) | | Returns the controller ID.
Returns the controller ID. |
getControllerName | public String getControllerName()(Code) | | Returns the controllerName value.
Returns the controllerName. |
getControllerPersistentConnectionsRecovered | public List getControllerPersistentConnectionsRecovered(Long controllerId)(Code) | | Used by the ControllerFailureCleanupThread to cleanup following a
controller failure. This returned the list of recovered persistent
connections and removes the list.
Parameters: controllerId - the id of the failed controller List of recovered persistent connections for the given controllerid (null if none) |
getCurrentGroup | public Group getCurrentGroup()(Code) | | Returns the currentGroup value.
Returns the currentGroup. |
getDistributedRequestLogger | final public Trace getDistributedRequestLogger()(Code) | | Returns the distributedRequestLogger value.
Returns the distributedRequestLogger. |
getDistributionXml | protected String getDistributionXml()(Code) | | Get the XML dump of the Distribution element.
XML dump of the Distribution element |
getGroupName | public String getGroupName()(Code) | | Returns the group name this virtual database belongs to.
a String value. Returns null if thisvirtual database is standalone |
getMessageTimeouts | public MessageTimeouts getMessageTimeouts()(Code) | | Returns the messageTimeouts value.
Returns the messageTimeouts. |
getMulticastRequestAdapter | public MulticastRequestAdapter getMulticastRequestAdapter()(Code) | | Return the group communication multicast request adapter.
the group communication multicast request adapter |
getPreparedStatementGetMetaData | public ControllerResultSet getPreparedStatementGetMetaData(AbstractRequest request) throws SQLException(Code) | | Return a ControllerResultSet containing the PreparedStatement metaData of
the given sql template
Parameters: request - the request containing the sql template an empty ControllerResultSet with the metadata throws: SQLException - if a database error occurs |
getRequestResultFailoverCache | public RequestResultFailoverCache getRequestResultFailoverCache()(Code) | | Returns the request result failover cache associated to this distributed
virtual database.
a RequestResultFailoverCache object. |
getStaticMetaData | public VirtualDatabaseStaticMetaData getStaticMetaData()(Code) | | Get the whole static metadata for this virtual database. A new empty
metadata object is created if there was none yet. It will be filled later
by gatherStaticMetadata() when the backend is enabled.
Virtual database static metadata |
getTransactionsRecovered | public List getTransactionsRecovered(Long controllerId)(Code) | | Used by the ControllerFailureCleanupThread to cleanup following a
controller failure. This returned the list of recovered transactions and
removes the list.
Parameters: controllerId - the id of the failed controller List of recovered transactions for the given controller id (null ifnone) |
groupComposition | public void groupComposition(Group g, IpAddress sender, int gmsStatus)(Code) | | See Also: org.continuent.hedera.gms.GroupMembershipListener.groupComposition(org.continuent.hedera.common.Grouporg.continuent.hedera.common.IpAddressint) |
handleMessageMultiThreaded | public Serializable handleMessageMultiThreaded(Serializable msg, Member sender, Object handleMessageSingleThreadedResult)(Code) | | See Also: org.continuent.hedera.adapters.MulticastRequestListener.handleMessageMultiThreaded(java.io.Serializableorg.continuent.hedera.common.Memberjava.lang.Object) |
handleMessageSingleThreaded | public Object handleMessageSingleThreaded(Serializable msg, Member sender)(Code) | | This method handle the scheduling part of the queries to be sure that the
query is scheduled in total order before letting other queries to execute.
See Also: org.continuent.hedera.adapters.MulticastRequestListener.handleMessageSingleThreaded(java.io.Serializableorg.continuent.hedera.common.Member) |
handleRemoteDisableBackendNotification | public void handleRemoteDisableBackendNotification(DatabaseBackend disabledBackend, Member sender)(Code) | | Update remote backends list after a backend disable notification has been
received.
Parameters: disabledBackend - backend that is disabled Parameters: sender - the message sender |
handleRemoteDisableBackendsNotification | public void handleRemoteDisableBackendsNotification(ArrayList disabledBackendInfos, Member sender)(Code) | | Update remote backends list after a backend disable notification has been
received.
Parameters: disabledBackendInfos - List of BackendInfo objects that are disabled Parameters: sender - the message sender |
initGlobalCounters | public void initGlobalCounters(long controllerId) throws SQLException(Code) | | Initializes global counters based on recovery log.
Parameters: controllerId - this controller id, as allocated by hte groupcommunication. Base of all global counters numbering: counters arelayed out as [ controllerId | ] throws: SQLException - if an error occurs accessing the recovery log |
isAliveController | public boolean isAliveController(Long controllerId)(Code) | | Returns true if the corresponding controller is alive
Parameters: controllerId - Id of the controller to check true if controller is in controllerIds list |
isCompatibleBackend | public boolean isCompatibleBackend(BackendInfo backend) throws VirtualDatabaseException(Code) | | Check if the given backend definition is compatible with the backend
definitions of this distributed virtual database. Not that if the given
backend does not exist in the current configuration, it is considered as
compatible. Incompatibility results from 2 backends with the same JDBC URL
or same logical name.
Parameters: backend - the backend to check true if the backend is compatible with the local definition throws: VirtualDatabaseException - if locking the local backend list fails |
isCompatibleDatabaseSchema | public boolean isCompatibleDatabaseSchema(DatabaseSchema dbs)(Code) | | Return true if the provided schema is compatible with the existing schema
of this distributed virtual database. Note that if the given schema is
null, this function returns true.
Parameters: dbs - the database schema to compare with true if dbs is compatible with the current schema (according toRAIDb level) |
isDistributed | public boolean isDistributed()(Code) | | Is this virtual database distributed ?
true |
isLocalSender | public boolean isLocalSender(Member sender)(Code) | | Returns true if the given member is ourselves.
Parameters: sender - the sender true if we are the sender, false otherwise |
isProcessMacroBeforeBroadcast | public boolean isProcessMacroBeforeBroadcast()(Code) | | Returns the processMacroBeforeBroadcast value.
Returns the processMacroBeforeBroadcast. |
isResyncing | protected boolean isResyncing()(Code) | | |
isVirtualDatabaseStarted | final public boolean isVirtualDatabaseStarted()(Code) | | Returns the isVirtualDatabaseStarted value.
Returns the isVirtualDatabaseStarted. |
joinGroup | public void joinGroup(boolean resyncRecoveryLog) throws Exception(Code) | | Makes this virtual database join a virtual database group. Those groups are
mapped to JavaGroups groups.
exception: Exception - if an error occurs |
joinMember | public void joinMember(Member m, GroupIdentifier gid)(Code) | | See Also: org.continuent.hedera.gms.GroupMembershipListener.joinMember(org.continuent.hedera.common.Memberorg.continuent.hedera.common.GroupIdentifier) |
networkPartition | public void networkPartition(GroupIdentifier gid, List mergedGroupCompositions)(Code) | | See Also: org.continuent.hedera.gms.GroupMembershipListener.networkPartition(org.continuent.hedera.common.GroupIdentifierjava.util.List) |
notifyPersistentConnectionFailover | public void notifyPersistentConnectionFailover(Long controllerId, Long connectionId)(Code) | | Called by FailoverForPersistentConnection when a client reconnects
following a controller failure.
Parameters: controllerId - the id of the failed controller Parameters: connectionId - the id of the persistent connection |
notifyTransactionFailover | public void notifyTransactionFailover(Long controllerId, Long transactionId)(Code) | | Called by FailoverForTransaction when a client reconnects following a
controller failure.
Parameters: controllerId - the id of the failed controller Parameters: transactionId - the id of the transaction |
quitChannel | public void quitChannel()(Code) | | Terminate the multicast request adapter and quit the Hedera channel.
|
quitChannel | public void quitChannel(int level)(Code) | | Terminate the multicast request adapter and quit the Hedera channel.
Parameters: level - of the vdb shutdown operation being executed |
quitMember | public void quitMember(Member m, GroupIdentifier gid)(Code) | | See Also: org.continuent.hedera.gms.GroupMembershipListener.quitMember(org.continuent.hedera.common.Memberorg.continuent.hedera.common.GroupIdentifier) |
receive | public void receive(Serializable msg)(Code) | | See Also: org.continuent.hedera.adapters.MessageListener.receive(java.io.Serializable) |
removeOngoingActivitySuspension | public void removeOngoingActivitySuspension(Member controllerMember)(Code) | | Removes an ongoing activity suspension marker from the current list only if
resuming was not triggered by the local member.
Parameters: controllerMember - member which triggered the activity resuming |
sendLocalConfiguration | public void sendLocalConfiguration(Member dest) throws NotConnectedException(Code) | | Sent the local controller configuration to a remote controller
Parameters: dest - the membership of the controller so send the information to throws: NotConnectedException - if the group communication channel is notconected |
sendMessageToController | public Serializable sendMessageToController(Member controllerMember, Serializable message, long timeout) throws VirtualDatabaseException(Code) | | Send a Message to a remote controller, referenced by its Member. This sends
a point-to-point message, fifo. No total order is specifically required
(but enforced anyway).
Parameters: controllerMember - Member object refering to the remote controller Parameters: message - the message to send (should be Serializable) Parameters: timeout - message timeout in ms the result returned by the remote controller (except if this anexception in which case it is automatically thrown) throws: VirtualDatabaseException - (wrapping error) in case of communicationfailure |
sendMessageToControllers | public MulticastResponse sendMessageToControllers(ArrayList members, Serializable message, long timeout) throws VirtualDatabaseException(Code) | | Send a Message to a set of controllers. This sends a multicast message,
fifo and checks for returned exceptions. No total order is specifically
required (but enforced anyway). If an exception is returned, it is
rethrown.
Parameters: members - ArrayList of Member object refering to controllers Parameters: message - the message to send (should be Serializable) Parameters: timeout - message timeout in ms the result returned (except if one controller returned an exceptionin which case it is automatically thrown) throws: VirtualDatabaseException - (wrapping error) in case of communicationfailure |
setGroupCheckpoint | public void setGroupCheckpoint(String checkpointName, ArrayList groupMembers) throws VirtualDatabaseException(Code) | | Set a cluster-wide checkpoint relying on the implementation of
SetCheckpoint to atomically set the checkpoint on all controllers. This
method leaves writes, transactions, and persistent connections suspended.
The caller must call RequestManager.resumeActivity() when the processing
associated with this checkpoint is complete.
Parameters: checkpointName - the name of the (transfer) checkpoint to create Parameters: groupMembers - an ArrayList of target Members throws: VirtualDatabaseException - in case of scheduler or recoveryLogexceptions See Also: SetCheckpointAndResumeTransactions |
setGroupName | public void setGroupName(String groupName)(Code) | | Sets the group name used by the controllers hosting this virtual database.
Parameters: groupName - the group name to set |
setLogReplicationCheckpoint | public String setLogReplicationCheckpoint(Member controller) throws VirtualDatabaseException(Code) | | Sets an atomic (group-wide) checkpoint on local & target controllers
(refrenced by Name). When this call completes sucessfully, all activity on
the system is suspend. RequestManager.resumeActivity() must be called to
resume processing.
Parameters: controller - the target remote controller the 'now' checkpoint name. throws: VirtualDatabaseException - in case of error (whatever error, wrapsthe underlying error) |
setMessageTimeouts | public void setMessageTimeouts(MessageTimeouts messageTimeouts)(Code) | | Sets the messageTimeouts value.
Parameters: messageTimeouts - The messageTimeouts to set. |
setProcessMacroBeforeBroadcast | public void setProcessMacroBeforeBroadcast(boolean processMacros)(Code) | | Sets the processMacroBeforeBroadcast value.
Parameters: processMacros - true if macros must be processed before broadcast. |
setRequestManager | public void setRequestManager(RequestManager requestManager)(Code) | | Sets a new distributed request manager for this database.
Parameters: requestManager - the new request manager. |
setShutdownCheckpoint | public void setShutdownCheckpoint()(Code) | | Sets an atomic (group-wide) checkpoint on all controllers, indicating that
this vdb has shutdown.
|
waitForBlockAndSuspendInTotalOrder | public boolean waitForBlockAndSuspendInTotalOrder(Object request, boolean errorIfNotFound)(Code) | | Variant of the waitForTotalOrder() method, please refer to its
documentation. The difference here is that we only wait for request of type
SuspendWritesMessage which are in front of the given request. All other
request are by-passed.
See Also: ResumeActivity See Also: BlockActivity See Also: SuspendActivity Parameters: request - the request to wait for (expected to be aResumeActivityMessage) Parameters: errorIfNotFound - true if an error message should be logged if therequest is not found in the total order queue true if the element was found and wait has succeeded, falseotherwise |
waitForGroupCommunicationMessagesLocallyFlushed | public void waitForGroupCommunicationMessagesLocallyFlushed(long failedControllerId)(Code) | | Waits for all messages in the group communication to be flushed locally.
Parameters: failedControllerId - controller whose suspected failure triggered thewait operation. |
waitForTotalOrder | public boolean waitForTotalOrder(Object request, boolean errorIfNotFound)(Code) | | If we are executing in a distributed virtual database, we have to make sure
that we post the query in the queue following the total order. This method
does not remove the request from the total order queue. You have to call
removeHeadFromAndNotifyTotalOrderQueue() to do so.
Parameters: request - the request to wait for (can be any object but usually aDistributedRequest, Commit or Rollback) Parameters: errorIfNotFound - true if an error message should be logged if therequest is not found in the total order queue true if the element was found and wait has succeeded, falseotherwise |
Methods inherited from org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase | public void abort(long transactionId, boolean logAbort, boolean forceAbort) throws SQLException(Code)(Java Doc) final public void acquireReadLockBackendLists() throws InterruptedException(Code)(Java Doc) protected void addAdminOperation(AbstractAdminOperation operation)(Code)(Java Doc) public void addBackend(DatabaseBackend db) throws VirtualDatabaseException(Code)(Java Doc) public void addBackend(DatabaseBackend db, boolean checkForCompliance) throws VirtualDatabaseException(Code)(Java Doc) public void addVirtualDatabaseWorkerThread(VirtualDatabaseWorkerThread thread)(Code)(Java Doc) public void backupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, boolean force, ArrayList tables) throws VirtualDatabaseException(Code)(Java Doc) public long begin(String login, boolean isPersistentConnection, long persistentConnectionId) throws SQLException(Code)(Java Doc) public String buildCheckpointName(String event)(Code)(Java Doc) protected ExecuteResult callableStatementExecute(StoredProcedure proc) throws SQLException(Code)(Java Doc) protected ControllerResultSet callableStatementExecuteQuery(StoredProcedure proc) throws SQLException(Code)(Java Doc) protected ExecuteUpdateResult callableStatementExecuteUpdate(StoredProcedure proc) throws SQLException(Code)(Java Doc) public boolean checkAdminAuthentication(String adminLogin, String adminPassword)(Code)(Java Doc) public void checkAndAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser)(Code)(Java Doc) public boolean checkUserAuthentication(String virtualLogin, String virtualPassword)(Code)(Java Doc) public void cleanMonitoringData() throws VirtualDatabaseException(Code)(Java Doc) public void clearConnectionWarnings(long connId) throws SQLException(Code)(Java Doc) public void closePersistentConnection(String login, long persistentConnectionId)(Code)(Java Doc) public void commit(long transactionId, boolean logCommit, boolean emptyTransaction) throws SQLException(Code)(Java Doc) public void copyDump(String dumpName, String remoteControllerName) throws VirtualDatabaseException(Code)(Java Doc) public void copyLogFromCheckpoint(String dumpName, String controllerName) throws VirtualDatabaseException(Code)(Java Doc) protected void decreaseCurrentNbOfThread()(Code)(Java Doc) protected void decreaseIdleThread()(Code)(Java Doc) public void deleteDump(String dumpName, boolean keepsFile) throws VirtualDatabaseException(Code)(Java Doc) public void deleteLogUpToCheckpoint(String checkpointName) throws VirtualDatabaseException(Code)(Java Doc) public void disableAllBackends(boolean forceEnable) throws VirtualDatabaseException(Code)(Java Doc) public void disableAllBackendsWithCheckpoint(String checkpoint) throws VirtualDatabaseException(Code)(Java Doc) public void disableBackendWithCheckpoint(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public VirtualDatabaseStaticMetaData doGetStaticMetaData()(Code)(Java Doc) public void enableAllBackends() throws VirtualDatabaseException(Code)(Java Doc) public void enableAllBackendsFromCheckpoint() throws VirtualDatabaseException(Code)(Java Doc) public void enableBackendFromCheckpoint(String backendName, String checkpointName) throws VirtualDatabaseException(Code)(Java Doc) public void enableBackendFromCheckpoint(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public boolean enforceTableExistenceIntoSchema()(Code)(Java Doc) public boolean equals(Object other)(Code)(Java Doc) public void failoverForPersistentConnection(long persistentConnectionId)(Code)(Java Doc) public void failoverForTransaction(long currentTid)(Code)(Java Doc) public void forceDisableBackend(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public void forceEnableAllBackendsFromCheckpoint(String checkpoint) throws VirtualDatabaseException(Code)(Java Doc) public void forceEnableBackend(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public ArrayList getActiveThreads()(Code)(Java Doc) public ArrayList getAllBackendNames() throws VirtualDatabaseException(Code)(Java Doc) public DatabaseBackend getAndCheckBackend(String backendName, int testEnable) throws VirtualDatabaseException(Code)(Java Doc) public AuthenticationManager getAuthenticationManager()(Code)(Java Doc) public DumpInfo[] getAvailableDumps() throws VirtualDatabaseException(Code)(Java Doc) public String getBackendInformation(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public String getBackendSchema(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public String getBackendState(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public BackendStatistics getBackendStatistics(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public ArrayList getBackends()(Code)(Java Doc) public String[] getBackuperNames()(Code)(Java Doc) public SQLWarning getConnectionWarnings(long connId) throws SQLException(Code)(Java Doc) public int getCurrentNbOfThreads()(Code)(Java Doc) public String getDatabaseName()(Code)(Java Doc) public String getDatabaseProductName()(Code)(Java Doc) public DatabaseSchema getDatabaseSchemaFromActiveBackends() throws SQLException(Code)(Java Doc) public DatabaseSchema getDatabaseSchemaFromActiveBackendsAndRefreshDatabaseProductNames() throws SQLException(Code)(Java Doc) protected String getDistributionXml()(Code)(Java Doc) public String getDumpFormatForBackuper(String backuperName)(Code)(Java Doc) public VirtualDatabaseDynamicMetaData getDynamicMetaData()(Code)(Java Doc) DatabaseBackend getFirstAvailableBackend()(Code)(Java Doc) public int getIdleThreads()(Code)(Java Doc) final public Trace getLogger()(Code)(Java Doc) public int getMaxNbOfConnections()(Code)(Java Doc) public int getMaxNbOfThreads()(Code)(Java Doc) public long getMaxThreadIdleTime()(Code)(Java Doc) public int getMinNbOfThreads()(Code)(Java Doc) public long getNextConnectionId()(Code)(Java Doc) public long getNextRequestId()(Code)(Java Doc) protected int getNumberOfEnabledBackends() throws VirtualDatabaseException(Code)(Java Doc) public int getNumberOfSavepointsInTransaction(long tId)(Code)(Java Doc) public ArrayList getPendingConnections()(Code)(Java Doc) public ControllerResultSet getPreparedStatementGetMetaData(AbstractRequest request) throws SQLException(Code)(Java Doc) public RequestManager getRequestManager()(Code)(Java Doc) public SQLMonitoring getSQLMonitor()(Code)(Java Doc) public int getSqlShortFormLength()(Code)(Java Doc) public VirtualDatabaseStaticMetaData getStaticMetaData()(Code)(Java Doc) public LinkedList getTotalOrderQueue()(Code)(Java Doc) public String getVirtualDatabaseName()(Code)(Java Doc) public VirtualDatabaseWorkerThread getVirtualDatabaseWorkerThreadForPersistentConnection(long persistentConnectionId)(Code)(Java Doc) public VirtualDatabaseWorkerThread getVirtualDatabaseWorkerThreadForTransaction(long transactionId)(Code)(Java Doc) public String getXml()(Code)(Java Doc) public boolean hasPersistentConnection(long persistentConnectionId)(Code)(Java Doc) public boolean hasRecoveryLog()(Code)(Java Doc) public boolean hasResultCache()(Code)(Java Doc) protected void incrementCurrentNbOfThread()(Code)(Java Doc) protected void incrementIdleThreadCount()(Code)(Java Doc) public void initializeFromBackend(String databaseBackendName, boolean force) throws VirtualDatabaseException(Code)(Java Doc) public boolean isDistributed()(Code)(Java Doc) public boolean isDumpNameAvailable(String tentativeDumpName)(Code)(Java Doc) public boolean isPoolConnectionThreads()(Code)(Java Doc) public boolean isRejectingNewTransaction()(Code)(Java Doc) protected boolean isResyncing()(Code)(Java Doc) public boolean isShuttingDown()(Code)(Java Doc) public boolean isValidUserForAllBackends(VirtualDatabaseUser vdbUser)(Code)(Java Doc) public void openPersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)(Java Doc) public void performAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser) throws SQLException(Code)(Java Doc) public void performRemoveVirtualDatabaseUser(VirtualDatabaseUser vdbUser)(Code)(Java Doc) final public void releaseReadLockBackendLists()(Code)(Java Doc) public void releaseSavepoint(long transactionId, String savepointName) throws SQLException(Code)(Java Doc) protected boolean removeAdminOperation(AbstractAdminOperation operation)(Code)(Java Doc) public void removeBackend(String backend) throws VirtualDatabaseException(Code)(Java Doc) public void removeBackend(DatabaseBackend db) throws VirtualDatabaseException(Code)(Java Doc) public void removeCheckpoint(String checkpointName) throws VirtualDatabaseException(Code)(Java Doc) public void replicateBackend(String backendName, String newBackendName, Map parameters) throws VirtualDatabaseException(Code)(Java Doc) public void restoreDumpOnBackend(String databaseBackendName, String login, String password, String dumpName, ArrayList tables) throws VirtualDatabaseException(Code)(Java Doc) public String[][] retrieveBackendsData() throws VirtualDatabaseException(Code)(Java Doc) public void rollback(long transactionId, boolean logRollback) throws SQLException(Code)(Java Doc) public void rollback(long transactionId, String savepointName) throws SQLException(Code)(Java Doc) protected void sendJmxNotification(String type, String message)(Code)(Java Doc) public void setAuthenticationManager(AuthenticationManager authenticationManager)(Code)(Java Doc) public void setBackendLastKnownCheckpoint(String backendName, String checkpoint) throws VirtualDatabaseException(Code)(Java Doc) public void setMaxNbOfConnections(int maxNbOfConnections)(Code)(Java Doc) public void setMaxNbOfThreads(int maxNbOfThreads)(Code)(Java Doc) public void setMaxThreadIdleTime(long maxThreadIdleTime)(Code)(Java Doc) public void setMinNbOfThreads(int minNbOfThreads)(Code)(Java Doc) public void setMonitoringToActive(boolean active) throws VirtualDatabaseException(Code)(Java Doc) public void setNotificationBroadcasterSupport(NotificationBroadcasterSupport notificationBroadcasterSupport)(Code)(Java Doc) public void setPoolConnectionThreads(boolean poolConnectionThreads)(Code)(Java Doc) public void setRejectingNewTransaction(boolean canAcceptNewTransaction)(Code)(Java Doc) public void setRequestManager(RequestManager requestManager)(Code)(Java Doc) public void setSQLMonitor(SQLMonitoring sqlMonitor)(Code)(Java Doc) public int setSavepoint(long transactionId) throws SQLException(Code)(Java Doc) public void setSavepoint(long transactionId, String name) throws SQLException(Code)(Java Doc) public void setShutdownCheckpoint()(Code)(Java Doc) public void setShuttingDown(boolean shuttingDown)(Code)(Java Doc) public void setStaticDatabaseSchema(DatabaseSchema schema)(Code)(Java Doc) public void shutdown(int level)(Code)(Java Doc) protected ExecuteResult statementExecute(AbstractRequest request) throws SQLException(Code)(Java Doc) protected ControllerResultSet statementExecuteQuery(SelectRequest request) throws SQLException(Code)(Java Doc) protected ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws SQLException(Code)(Java Doc) protected GeneratedKeysResult statementExecuteUpdateWithKeys(AbstractWriteRequest request) throws SQLException(Code)(Java Doc) public void storeBackendsInfo()(Code)(Java Doc) public void transferBackend(String backend, String controllerDestination) throws VirtualDatabaseException(Code)(Java Doc) public void transferDump(String dumpName, String remoteControllerName, boolean noCopy) throws VirtualDatabaseException(Code)(Java Doc) public void updateDumpPath(String dumpName, String newPath) throws VirtualDatabaseException(Code)(Java Doc) final public boolean useStaticResultSetMetaData()(Code)(Java Doc) public ArrayList viewAllClientNames()(Code)(Java Doc) public String[] viewBackendInformation(String backendName) throws VirtualDatabaseException(Code)(Java Doc) public ArrayList viewCheckpointNames()(Code)(Java Doc) public String[] viewControllerList()(Code)(Java Doc) public Hashtable viewGroupBackends() throws VirtualDatabaseException(Code)(Java Doc) public String viewOwningController()(Code)(Java Doc)
|
|
|