1 /** 2 * Sequoia: Database clustering technology. 3 * Copyright (C) 2006 Continuent. 4 * Contact: sequoia@continuent.org 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 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 */ 21 22 package org.continuent.sequoia.common.jmx.mbeans; 23 24 /** 25 * MBean Interface to manage the request schedulers 26 * 27 * @see org.continuent.sequoia.common.jmx.JmxConstants#getAbstractSchedulerObjectName(String) 28 */ 29 public interface AbstractSchedulerControlMBean 30 { 31 /** 32 * Returns the list of active transactions. Active transactions those that had 33 * a "begin" but no "commit" yet. Note that for persistent connections, a 34 * "begin" is sent after each "commit" ; thus, these ids can reference 35 * transactions that havn't any statement 36 * 37 * @return an array of the transaction ids 38 */ 39 long[] listActiveTransactionIds(); 40 41 /** 42 * Returns the list of write requests that have been scheduled for execution. 43 * The list also include stored procedures (even read-only ones) 44 * 45 * @return an array of scheduled write request ids, or an empty array if there 46 * are no pending write requests 47 */ 48 long[] listPendingWriteRequestIds(); 49 50 /** 51 * Returns the list of read requests that have been scheduled for execution. 52 * The list does not include stored procedures (not even read-only ones) 53 * 54 * @return an array of scheduled read request ids, or an empty array if there 55 * are no pending read requests 56 */ 57 long[] listPendingReadRequestIds(); 58 59 /** 60 * Returns a string containing information about the given request (if found 61 * in the current scheduler) 62 * 63 * @param requestId identifier of the request to dump 64 * @return a String representation of the request information 65 */ 66 String dumpRequest(long requestId); 67 } 68