01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2006 Continuent.
04: * Contact: sequoia@continuent.org
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: *
18: * Initial developer(s): Jeff Mesnil.
19: * Contributor(s): ______________________.
20: */package org.continuent.sequoia.common.jmx.mbeans;
21:
22: import java.util.Hashtable;
23:
24: import javax.management.openmbean.TabularData;
25:
26: import org.continuent.sequoia.common.jmx.management.TransactionDataSupport;
27:
28: /**
29: * MBean Interface to manage the request schedulers
30: *
31: * @see org.continuent.sequoia.common.jmx.JmxConstants#getAbstractSchedulerObjectName(String)
32: */
33: public interface AbstractSchedulerControlMBean {
34: /**
35: * Returns the list of active transactions. Active transactions those that had
36: * a "begin" but no "commit" yet. Note that for persistent connections, a
37: * "begin" is sent after each "commit" ; thus, these ids can reference
38: * transactions that havn't any statement
39: *
40: * @return an array of the transaction ids
41: */
42: long[] listActiveTransactionIds();
43:
44: /**
45: * Returns a TabularData representations of transactions.
46: *
47: * @see TransactionDataSupport
48: */
49: TabularData getActiveTransactions() throws Exception;
50:
51: /**
52: * Returns the list of write requests that have been scheduled for execution.
53: * The list also include stored procedures (even read-only ones)
54: *
55: * @return an array of scheduled write request ids, or an empty array if there
56: * are no pending write requests
57: */
58: long[] listPendingWriteRequestIds();
59:
60: /**
61: * Returns the list of read requests that have been scheduled for execution.
62: * The list does not include stored procedures (not even read-only ones)
63: *
64: * @return an array of scheduled read request ids, or an empty array if there
65: * are no pending read requests
66: */
67: long[] listPendingReadRequestIds();
68:
69: /**
70: * Returns a hashtable of all the open persistent connections (and their
71: * associated login).
72: *
73: * @return persistent connection hashtable
74: */
75: Hashtable listOpenPersistentConnections();
76:
77: /**
78: * Returns a string containing information about the given request (if found
79: * in the current scheduler)
80: *
81: * @param requestId identifier of the request to dump
82: * @return a String representation of the request information
83: */
84: String dumpRequest(long requestId);
85: }
|