|
From: Bryan T. <tho...@us...> - 2007-04-10 18:33:39
|
Update of /cvsroot/cweb/bigdata/src/java/com/bigdata/service In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24584/src/java/com/bigdata/service Modified Files: IDataService.java Log Message: Fixed a bug in UUID assignment to index segments. Added some logic for fast data output for btree nodes and leaves. Index: IDataService.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/java/com/bigdata/service/IDataService.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IDataService.java 27 Mar 2007 14:34:24 -0000 1.4 --- IDataService.java 10 Apr 2007 18:33:31 -0000 1.5 *************** *** 93,102 **** --- 93,105 ---- /** + * <p> * Used by the client to submit a batch operation on a named B+Tree * (synchronous). + * </p> * <p> * Unisolated operations SHOULD be used to achieve "auto-commit" semantics. * Fully isolated transactions are useful IFF multiple operations must be * composed into a ACID unit. + * </p> * <p> * While unisolated batch operations on a single data service are ACID, *************** *** 111,114 **** --- 114,118 ---- * throughput SHOULD choose unisolated read operations in preference to a * read-committed transaction. + * </p> * <p> * This method is thread-safe. It will block for each operation. It should *************** *** 118,121 **** --- 122,126 ---- * operations MUST be buffered by a thread pool with a FIFO policy so that * client requests may be decoupled from data service operations. + * </p> * * @param tx *************** *** 134,148 **** * {@link ExecutionException#getCause()} for the underlying * error. */ public void batchOp(long tx, String name, IBatchOp op) throws InterruptedException, ExecutionException, IOException; ! /** - * Submit a procedure. * <p> * <p> * Unisolated operations SHOULD be used to achieve "auto-commit" semantics. * Fully isolated transactions are useful IFF multiple operations must be * composed into a ACID unit. * <p> * While unisolated batch operations on a single data service are ACID, --- 139,202 ---- * {@link ExecutionException#getCause()} for the underlying * error. + * + * @todo it is possible to have concurrent execution of batch operations for + * distinct indices. In order to support this, the write thread would + * have to become a pool of N worker threads fed from a queue of + * operations. Concurrent writers can execute as long as they are + * writing on different indices. (Concurrent readers can execute as + * long as they are reading from a historical commit time.) */ public void batchOp(long tx, String name, IBatchOp op) throws InterruptedException, ExecutionException, IOException; ! /** * <p> + * Streaming traversal of keys and/or values in a given key range. + * </p> + * <p> + * Note: The rangeQuery operation is NOT allowed for read-committed + * transactions (the underlying constraint is that the {@link BTree} does + * NOT support traversal under concurrent modification so this operation is + * limited to read-only or fully isolated transactions or to unisolated + * reads against a historical commit time). + * </p> + * + * @param tx + * @param name + * @param fromKey + * @param toKey + * @param flags + * (@todo define flags: count yes/no, keys yes/no, values yes/no) + * + * @exception InterruptedException + * if the operation was interrupted (typically by + * {@link #shutdownNow()}. + * @exception ExecutionException + * If the operation caused an error. See + * {@link ExecutionException#getCause()} for the underlying + * error. + * @exception UnsupportedOperationException + * If the tx is zero (0L) (indicating an unisolated + * operation) -or- if the identifed transaction is + * {@link IsolationEnum#ReadCommitted}. + * + * FIXME support filters. there are a variety of use cases from clients that + * are aware of version counters and delete markers to clients that encode a + * column name and datum or write time into the key to those that will + * filter based on inspection of the value associated with the key, e.g., + * only values having some attribute. + */ + public RangeQueryResult rangeQuery(long tx, String name, byte[] fromKey, + byte[] toKey, int flags) throws InterruptedException, + ExecutionException, IOException, IOException; + /** + * <p> + * Submit a procedure. + * </p> * <p> * Unisolated operations SHOULD be used to achieve "auto-commit" semantics. * Fully isolated transactions are useful IFF multiple operations must be * composed into a ACID unit. + * </p> * <p> * While unisolated batch operations on a single data service are ACID, *************** *** 157,160 **** --- 211,215 ---- * throughput SHOULD choose unisolated read operations in preference to a * read-committed transaction. + * </p> * * @param tx *************** *** 163,167 **** * @param proc * The procedure to be executed. ! * * @throws InterruptedException * @throws ExecutionException --- 218,222 ---- * @param proc * The procedure to be executed. ! * * @throws InterruptedException * @throws ExecutionException *************** *** 169,202 **** public void submit(long tx, IProcedure proc) throws InterruptedException, ExecutionException, IOException; - - /** - * Streaming traversal of keys and/or values in a given key range. - * <p> - * Note: The rangeQuery operation is NOT allowed for either unisolated reads - * or read-committed transactions (the underlying constraint is that the - * {@link BTree} does NOT support traversal under concurrent modification - * this operation is limited to read-only or fully isolated transactions). - * - * @param tx - * @param name - * @param fromKey - * @param toKey - * @param flags (@todo define flags: count yes/no, keys yes/no, values yes/no) - * - * @exception InterruptedException - * if the operation was interrupted (typically by - * {@link #shutdownNow()}. - * @exception ExecutionException - * If the operation caused an error. See - * {@link ExecutionException#getCause()} for the underlying - * error. - * @exception UnsupportedOperationException - * If the tx is zero (0L) (indicating an unisolated - * operation) -or- if the identifed transaction is - * {@link IsolationEnum#ReadCommitted}. - */ - public RangeQueryResult rangeQuery(long tx, String name, byte[] fromKey, - byte[] toKey, int flags) throws InterruptedException, - ExecutionException, IOException, IOException; // /** --- 224,227 ---- |