cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r799331 [1/29] - in /incubator/cassandra/trunk: ./ src/java/org/apache/cassandra/concurrent/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/dht/ src/java/org/apache/cassandra/gms/ src/j...
Date Thu, 30 Jul 2009 15:30:27 GMT
Author: jbellis
Date: Thu Jul 30 15:30:21 2009
New Revision: 799331

URL: http://svn.apache.org/viewvc?rev=799331&view=rev
Log:
run source files through dos2unix to standardize on \n line endings.  patch by Jeff Hodges; reviewed by Michael Greene for CASSANDRA-111

Modified:
    incubator/cassandra/trunk/build.xml
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/AIOExecutorService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/Context.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationContext.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationStage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/IContinuable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/IStage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/MultiThreadedStage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/RejectedExecutionHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/SingleThreadedContinuationStage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/SingleThreadedStage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/StageManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ThreadFactoryImpl.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ThreadLocalContext.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryMemtableManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/BinaryVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CalloutDeployMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CalloutDeployVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CalloutManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Column.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamily.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyNotDefinedException.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnIndexer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogHeader.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CompactSerializerInvocationHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/DBConstants.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/DataFileVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/FileNameComparator.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/FileStructComparator.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/IColumn.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/IScanner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/LoadVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/MinorCompactionManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/PeriodicFlushManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ReadCommand.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ReadRepairVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ReadResponse.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ReadVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Row.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutationMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutationVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Scanner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/SliceByNamesReadCommand.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/SliceFromReadCommand.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/SuperColumn.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/SystemTable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/WriteResponse.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootstrapInitiateMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootstrapMetadata.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootstrapMetadataMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootstrapMetadataVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootstrapSourceTarget.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/IPartitioner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/LeaveJoinProtocolHelper.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/LeaveJoinProtocolImpl.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/OrderPreservingPartitioner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/RandomPartitioner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/Range.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/ApplicationState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/EndPointState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetectorMBean.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/GossipDigest.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/GossipDigestAck2Message.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/GossipDigestAckMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/GossipDigestSynMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/HeartBeatState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/IEndPointStateChangePublisher.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/IEndPointStateChangeSubscriber.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetectionEventListener.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureDetector.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/IFailureNotification.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/JoinMessage.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/PureRandom.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/VersionGenerator.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/BufferedRandomAccessFile.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/Coordinate.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DataInputBuffer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DataOutputBuffer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/FastBufferedInputStream.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/FastBufferedOutputStream.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/FileStruct.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/ICompactSerializer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/IFileReader.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/IndexHelper.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTableReader.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SequenceFile.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/AbstractStrategy.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/EndPointSnitch.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/IEndPointSnitch.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/IReplicaPlacementStrategy.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/RackAwareStrategy.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/RackUnawareStrategy.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/locator/TokenMetadata.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/AsyncResult.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/CompactEndPointSerializationHelper.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/ConnectionStatistics.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/EndPoint.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/FileStreamTask.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/Header.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/HeaderTypes.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/IAsyncCallback.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/IAsyncResult.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/IMessagingService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/IVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/Message.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/MessageDeliveryTask.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/MessageDeserializationTask.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/MessageSerializationTask.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/MessagingConfig.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/MultiAsyncResult.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/ProtocolHeader.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/ResponseVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/SelectionKeyHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/SelectorManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnection.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/TcpConnectionManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/UdpConnection.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ContentLengthState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ContentState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ContentStreamState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/DoneState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/FastSerializer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ISerializer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/IStreamComplete.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ProtocolHeaderState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ProtocolState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/ReadNotCompleteException.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/SerializerAttribute.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/SerializerType.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/StartState.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/StreamContextManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/io/TcpReader.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/sink/IMessageSink.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/net/sink/SinkManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/procedures/GroovyScriptRunner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/ConsistencyManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/DigestMismatchException.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/IResponseResolver.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/LoadDisseminator.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/LoadInfo.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/MultiQuorumResponseHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/QuorumResponseHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/ReadRepairManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/ReadResponseResolver.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageLoadBalancer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StreamManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/TokenUpdateVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/WriteResponseResolver.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/KeyChecker.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/MembershipCleaner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/MembershipCleanerVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/ThreadListBuilder.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/TokenUpdateVerbHandler.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/TokenUpdater.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/BasicUtilities.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/BloomCalculations.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/BloomFilter.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/Cachetable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FastLinkedHashMap.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FileUtils.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/GuidGenerator.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/HashingSchemes.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/ICacheExpungeHook.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/ICachetable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/Log4jLogger.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/LogUtil.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/SafeMessageDigest.java
    incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java
    incubator/cassandra/trunk/test/unit/org/apache/cassandra/gms/GossipDigestTest.java

Modified: incubator/cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/build.xml?rev=799331&r1=799330&r2=799331&view=diff
==============================================================================
--- incubator/cassandra/trunk/build.xml (original)
+++ incubator/cassandra/trunk/build.xml Thu Jul 30 15:30:21 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
@@ -17,295 +17,295 @@
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
-<project basedir="." default="build" name="apache-cassandra-incubating">
-    <property environment="env"/>
-    <property name="debuglevel" value="source,lines,vars"/>
-
-    <property name="basedir" value="."/>
-    <property name="build.src" value="${basedir}/src/java"/>
-    <property name="build.src.gen-java" value="${basedir}/src/gen-java"/>
-    <property name="build.lib" value="${basedir}/lib"/>
-    <property name="build.dir" value="${basedir}/build"/>
-    <property name="build.test.dir" value="${build.dir}/test"/>
-    <property name="build.classes" value="${build.dir}/classes"/>
-    <property name="javadoc.dir" value="${build.dir}/javadoc"/>
-    <property name="interface.dir" value="${basedir}/interface"/>
-    <property name="interface.src.dir" value="${interface.dir}/gen-java"/>
-    <property name="test.dir" value="${basedir}/test"/>
-    <property name="test.classes" value="${build.dir}/test/classes"/>
-    <property name="test.conf" value="${test.dir}/conf"/>
-    <property name="test.name" value="*Test"/>
-    <property name="test.unit.src" value="${test.dir}/unit"/>
-    <property name="dist.dir" value="${build.dir}/dist"/>
-    <property name="version" value="0.4.0-dev"/>
-    <property name="final.name" value="${ant.project.name}-${version}"/>
-
-    <!-- http://cobertura.sourceforge.net/ -->
-    <property name="cobertura.build.dir" value="${build.dir}/cobertura"/>
-    <!-- can't include due to licensing, specify jar via command line -->
-    <property name="cobertura.dir" value="/tmp"/>
-    <property name="cobertura.report.dir" value="${cobertura.build.dir}/report"/>
-    <property name="cobertura.classes.dir" value="${cobertura.build.dir}/classes"/>
-    <property name="cobertura.datafile" value="${cobertura.build.dir}/cobertura.ser"/>
-	
-    <!-- 
-	 Add all the dependencies.
-    -->
-    <path id="cassandra.classpath">
-        <pathelement location="${cobertura.classes.dir}"/>
-        <pathelement location="${build.classes}"/>
-        <fileset dir="${build.lib}">
-          <include name="**/*.jar" />
-        </fileset>
-    </path>
-
-    <!--
-	Setup the output directories.
-    -->
-    <target name="init">
-        <mkdir dir="${build.classes}"/>
-        <mkdir dir="${test.classes}"/>
-        <mkdir dir="${build.src.gen-java}"/>
-    </target>
-
-    <target name="clean">
-        <delete dir="${build.dir}" />
-        <delete dir="${build.src.gen-java}" />
-    </target>
-    <target depends="clean" name="cleanall"/>
-
-    <!--
-       This generates the CLI grammar files from Cli.g
-    -->
-    <target name="check-gen-cli-grammar">
-        <uptodate property="cliUpToDate" 
-                srcfile="${build.src}/org/apache/cassandra/cli/Cli.g" 
-                targetfile="${build.src.gen-java}/org/apache/cassandra/cli/Cli.tokens"/>
-    </target>
- 
-    <target name="gen-cli-grammar" depends="check-gen-cli-grammar" unless="cliUpToDate">
-      <echo>Building Grammar ${build.src}/org/apache/cassandra/cli/Cli.g  ....</echo>
-      <java classname="org.antlr.Tool"
-            classpath="${build.lib}/antlr-3.1.3.jar"
-            fork="true">
-         <arg value="${build.src}/org/apache/cassandra/cli/Cli.g" />
-         <arg value="-fo" />
-         <arg value="${build.src.gen-java}/org/apache/cassandra/cli/" />
-      </java> 
-    </target>
-
-    <!--
-       This generates the CQL grammar files from Cql.g
-    -->
-    <target name="check-gen-cql-grammar">
-        <uptodate property="cqlUpToDate" 
-                srcfile="${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g" 
-                targetfile="${build.src.gen-java}/org/apache/cassandra/cql/compiler/parse/Cql.tokens"/>
-    </target>
- 
-    <target name="gen-cql-grammar" depends="check-gen-cql-grammar" unless="cqlUpToDate">
-      <echo>Building Grammar ${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g  ....</echo>
-      <java classname="org.antlr.Tool"
-            classpath="${build.lib}/antlr-3.1.3.jar"
-            fork="true">
-         <arg value="${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g" />
-         <arg value="-fo" />
-         <arg value="${build.src.gen-java}/org/apache/cassandra/cql/compiler/parse/" />
-      </java> 
-    </target>
-
-    <target name="gen-thrift-java">
-      <echo>Generating Thrift Java code from ${basedir}/interface/cassandra.thrift ....</echo>
-      <exec executable="thrift" dir="${basedir}/interface">
-        <arg line="--gen java cassandra.thrift" />
-      </exec>
-    </target>
-    <target name="gen-thrift-py">
-      <echo>Generating Thrift Python code from ${basedir}/interface/cassandra.thrift ....</echo>
-      <exec executable="thrift" dir="${basedir}/interface">
-        <arg line="--gen py cassandra.thrift" />
-      </exec>
-    </target>
-
-    <!--
-	The build target builds all the .class files
-    -->
-    <target name="build" depends="build-subprojects,build-project"/>
-    <target name="build-subprojects"/>
-    <target name="codecoverage" depends="cobertura-instrument,test,cobertura-report"/>
-    	
-    <target depends="init,gen-cli-grammar,gen-cql-grammar" name="build-project">
-        <echo message="${ant.project.name}: ${ant.file}"/>
-        <javac debug="true" debuglevel="${debuglevel}" destdir="${build.classes}">
-            <src path="${build.src}"/>
-            <src path="${build.src.gen-java}"/>
-            <src path="${interface.src.dir}"/>
-            <classpath refid="cassandra.classpath"/>
-        </javac>
-    </target>
-
-    <!--
-	The jar target makes cassandra.jar output.
-    -->
-    <target name="jar" depends="build">
-      <mkdir dir="${build.classes}/META-INF"/>
-      <copy file="LICENSE.txt" tofile="${build.classes}/META-INF/LICENSE.txt"/>
-      <copy file="NOTICE.txt" tofile="${build.classes}/META-INF/NOTICE.txt"/>
-      <jar jarfile="${build.dir}/${final.name}.jar"
-           basedir="${build.classes}">
-        <manifest>
-        <!-- <section name="org/apache/cassandra/infrastructure"> -->
-          <attribute name="Implementation-Title" value="Cassandra"/>
-          <attribute name="Implementation-Version" value="${version}"/>
-          <attribute name="Implementation-Vendor" value="Apache"/>
-          <attribute name="Premain-Class" value="org.apache.cassandra.infrastructure.continuations.CAgent"/>
-        <!-- </section> -->
-        </manifest>
-      </jar>
-    </target>
-
-    <!-- creates a release tarball -->	
-    <target name="release" depends="jar,javadoc">
-      <mkdir dir="${dist.dir}"/>
-      <copy todir="${dist.dir}/lib">
-        <fileset dir="${build.lib}"/>
-        <fileset dir="${build.dir}">
-          <include name="*.jar" />
-        </fileset>
-      </copy>
-      <copy todir="${dist.dir}/javadoc">
-        <fileset dir="${javadoc.dir}"/>
-      </copy>
-      <copy todir="${dist.dir}/bin">
-        <fileset dir="bin"/>
-      </copy>
-      <copy todir="${dist.dir}/conf">
-        <fileset dir="conf"/>
-      </copy>   
-      <copy todir="${dist.dir}/interface">
-        <fileset dir="interface">
-          <include name="**/*.thrift" />
-        </fileset>
-      </copy>      
-      <copy todir="${dist.dir}/">
-        <fileset dir="${basedir}">
-          <include name="*.txt" />
-        </fileset>
-      </copy> 
-      
-      <tar compression="gzip" longfile="gnu"
-        destfile="${build.dir}/${final.name}-bin.tar.gz">
-
-        <!-- Everything but bin/ (default mode) -->
-        <tarfileset dir="${dist.dir}" prefix="${final.name}">
-          <include name="**"/>
-          <exclude name="bin/*" />
-        </tarfileset>
-        <!-- Shell includes in bin/ (default mode) -->
-        <tarfileset dir="${dist.dir}" prefix="${final.name}">
-          <include name="bin/*.in.sh" />
-        </tarfileset>
-        <!-- Executable scripts in bin/ -->
-        <tarfileset dir="${dist.dir}" prefix="${final.name}" mode="755">
-          <include name="bin/*"/>
-          <not>
-        	<filename name="bin/*.in.sh" />
-          </not>
-        </tarfileset>	
-      </tar>
-      <tar compression="gzip" longfile="gnu"
-        destfile="${build.dir}/${final.name}-src.tar.gz">
-
-        <tarfileset dir="${basedir}"
-          prefix="${final.name}-src">
-          <include name="**"/>
-          <exclude name="build/**" />
-        </tarfileset>
-      </tar>
-    </target>
-
-  <target name="build-test" depends="build" description="Build the Cassandra classes">
-    <javac
-     debug="true"
-     debuglevel="${debuglevel}"
-     destdir="${test.classes}"
-    >
-      <classpath refid="cassandra.classpath"/>
-      <src path="${test.unit.src}"/>
-    </javac>
-  </target>
-
-   <target name="test" depends="build-test">
-    <echo message="running tests"/>
-    <mkdir dir="${build.test.dir}/cassandra"/>
-    <mkdir dir="${build.test.dir}/output"/>
-    <junit fork="on" failureproperty="testfailed">
-      <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}"/>
-      <formatter type="xml" usefile="true"/>
-      <formatter type="brief" usefile="false"/>
-      <jvmarg value="-Dstorage-config=${test.conf}"/>
-      <jvmarg value="-ea"/>
-      <classpath>
-        <path refid="cassandra.classpath" />
-        <pathelement location="${test.classes}"/>
-        <pathelement location="${cobertura.dir}/cobertura.jar"/>
-        <pathelement location="${test.conf}"/>
-      </classpath>
-      <batchtest todir="${build.test.dir}/output">
-        <fileset dir="${test.classes}" includes="**/${test.name}.class" />
-      </batchtest>
-    </junit>
-
-    <fail if="testfailed" message="Some test(s) failed."/>
-  </target>
-	
-  <!-- instruments the classes to later create code coverage reports -->
-  <target name="cobertura-instrument" depends="build,build-test">
-    <taskdef resource="tasks.properties">
-      <classpath>
-        <fileset dir="${cobertura.dir}">
-            <include name="cobertura.jar" />
-            <include name="lib/**/*.jar" />
-        </fileset>
-      </classpath>
-    </taskdef>
-    
-    <delete file="${cobertura.datafile}"/>
-    
-    <cobertura-instrument todir="${cobertura.classes.dir}" datafile="${cobertura.datafile}">
-      <ignore regex="org.apache.log4j.*"/>
-      
-      <fileset dir="${build.classes}">
-        <include name="**/*.class"/>
-        <exclude name="**/*Test.class"/>
-        <exclude name="**/*TestCase.class"/>
-        <exclude name="**/test/*.class"/>
-        <exclude name="${cobertura.excludes}"/>
-      </fileset>
-     
-    </cobertura-instrument>
-  </target>	
-
-  <!-- create both html and xml code coverage reports -->
-  <target name="cobertura-report">
-    <cobertura-report format="html" destdir="${cobertura.report.dir}" srcdir="${build.src}"
-      datafile="${cobertura.datafile}"/>
-    <cobertura-report format="xml" destdir="${cobertura.report.dir}" srcdir="${build.src}"
-      datafile="${cobertura.datafile}"/>
-  </target>	
-	
-  <target name="javadoc" depends="init">
-    <tstamp>
-      <format property="YEAR" pattern="yyyy"/>
-    </tstamp>
-    <javadoc destdir="${javadoc.dir}" author="true" version="true" use="true"
-      windowtitle="${ant.project.name} API" classpathref="cassandra.classpath"
-      bottom="Copyright &amp;copy; ${YEAR} The Apache Software Foundation">
-
-      <fileset dir="${build.src}" defaultexcludes="yes">
-        <include name="org/apache/**/*.java"/>
-      </fileset>
-    </javadoc>
-   </target>
-
-</project>
+<project basedir="." default="build" name="apache-cassandra-incubating">
+    <property environment="env"/>
+    <property name="debuglevel" value="source,lines,vars"/>
+
+    <property name="basedir" value="."/>
+    <property name="build.src" value="${basedir}/src/java"/>
+    <property name="build.src.gen-java" value="${basedir}/src/gen-java"/>
+    <property name="build.lib" value="${basedir}/lib"/>
+    <property name="build.dir" value="${basedir}/build"/>
+    <property name="build.test.dir" value="${build.dir}/test"/>
+    <property name="build.classes" value="${build.dir}/classes"/>
+    <property name="javadoc.dir" value="${build.dir}/javadoc"/>
+    <property name="interface.dir" value="${basedir}/interface"/>
+    <property name="interface.src.dir" value="${interface.dir}/gen-java"/>
+    <property name="test.dir" value="${basedir}/test"/>
+    <property name="test.classes" value="${build.dir}/test/classes"/>
+    <property name="test.conf" value="${test.dir}/conf"/>
+    <property name="test.name" value="*Test"/>
+    <property name="test.unit.src" value="${test.dir}/unit"/>
+    <property name="dist.dir" value="${build.dir}/dist"/>
+    <property name="version" value="0.4.0-dev"/>
+    <property name="final.name" value="${ant.project.name}-${version}"/>
+
+    <!-- http://cobertura.sourceforge.net/ -->
+    <property name="cobertura.build.dir" value="${build.dir}/cobertura"/>
+    <!-- can't include due to licensing, specify jar via command line -->
+    <property name="cobertura.dir" value="/tmp"/>
+    <property name="cobertura.report.dir" value="${cobertura.build.dir}/report"/>
+    <property name="cobertura.classes.dir" value="${cobertura.build.dir}/classes"/>
+    <property name="cobertura.datafile" value="${cobertura.build.dir}/cobertura.ser"/>
+	
+    <!-- 
+	 Add all the dependencies.
+    -->
+    <path id="cassandra.classpath">
+        <pathelement location="${cobertura.classes.dir}"/>
+        <pathelement location="${build.classes}"/>
+        <fileset dir="${build.lib}">
+          <include name="**/*.jar" />
+        </fileset>
+    </path>
+
+    <!--
+	Setup the output directories.
+    -->
+    <target name="init">
+        <mkdir dir="${build.classes}"/>
+        <mkdir dir="${test.classes}"/>
+        <mkdir dir="${build.src.gen-java}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${build.dir}" />
+        <delete dir="${build.src.gen-java}" />
+    </target>
+    <target depends="clean" name="cleanall"/>
+
+    <!--
+       This generates the CLI grammar files from Cli.g
+    -->
+    <target name="check-gen-cli-grammar">
+        <uptodate property="cliUpToDate" 
+                srcfile="${build.src}/org/apache/cassandra/cli/Cli.g" 
+                targetfile="${build.src.gen-java}/org/apache/cassandra/cli/Cli.tokens"/>
+    </target>
+ 
+    <target name="gen-cli-grammar" depends="check-gen-cli-grammar" unless="cliUpToDate">
+      <echo>Building Grammar ${build.src}/org/apache/cassandra/cli/Cli.g  ....</echo>
+      <java classname="org.antlr.Tool"
+            classpath="${build.lib}/antlr-3.1.3.jar"
+            fork="true">
+         <arg value="${build.src}/org/apache/cassandra/cli/Cli.g" />
+         <arg value="-fo" />
+         <arg value="${build.src.gen-java}/org/apache/cassandra/cli/" />
+      </java> 
+    </target>
+
+    <!--
+       This generates the CQL grammar files from Cql.g
+    -->
+    <target name="check-gen-cql-grammar">
+        <uptodate property="cqlUpToDate" 
+                srcfile="${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g" 
+                targetfile="${build.src.gen-java}/org/apache/cassandra/cql/compiler/parse/Cql.tokens"/>
+    </target>
+ 
+    <target name="gen-cql-grammar" depends="check-gen-cql-grammar" unless="cqlUpToDate">
+      <echo>Building Grammar ${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g  ....</echo>
+      <java classname="org.antlr.Tool"
+            classpath="${build.lib}/antlr-3.1.3.jar"
+            fork="true">
+         <arg value="${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g" />
+         <arg value="-fo" />
+         <arg value="${build.src.gen-java}/org/apache/cassandra/cql/compiler/parse/" />
+      </java> 
+    </target>
+
+    <target name="gen-thrift-java">
+      <echo>Generating Thrift Java code from ${basedir}/interface/cassandra.thrift ....</echo>
+      <exec executable="thrift" dir="${basedir}/interface">
+        <arg line="--gen java cassandra.thrift" />
+      </exec>
+    </target>
+    <target name="gen-thrift-py">
+      <echo>Generating Thrift Python code from ${basedir}/interface/cassandra.thrift ....</echo>
+      <exec executable="thrift" dir="${basedir}/interface">
+        <arg line="--gen py cassandra.thrift" />
+      </exec>
+    </target>
+
+    <!--
+	The build target builds all the .class files
+    -->
+    <target name="build" depends="build-subprojects,build-project"/>
+    <target name="build-subprojects"/>
+    <target name="codecoverage" depends="cobertura-instrument,test,cobertura-report"/>
+    	
+    <target depends="init,gen-cli-grammar,gen-cql-grammar" name="build-project">
+        <echo message="${ant.project.name}: ${ant.file}"/>
+        <javac debug="true" debuglevel="${debuglevel}" destdir="${build.classes}">
+            <src path="${build.src}"/>
+            <src path="${build.src.gen-java}"/>
+            <src path="${interface.src.dir}"/>
+            <classpath refid="cassandra.classpath"/>
+        </javac>
+    </target>
+
+    <!--
+	The jar target makes cassandra.jar output.
+    -->
+    <target name="jar" depends="build">
+      <mkdir dir="${build.classes}/META-INF"/>
+      <copy file="LICENSE.txt" tofile="${build.classes}/META-INF/LICENSE.txt"/>
+      <copy file="NOTICE.txt" tofile="${build.classes}/META-INF/NOTICE.txt"/>
+      <jar jarfile="${build.dir}/${final.name}.jar"
+           basedir="${build.classes}">
+        <manifest>
+        <!-- <section name="org/apache/cassandra/infrastructure"> -->
+          <attribute name="Implementation-Title" value="Cassandra"/>
+          <attribute name="Implementation-Version" value="${version}"/>
+          <attribute name="Implementation-Vendor" value="Apache"/>
+          <attribute name="Premain-Class" value="org.apache.cassandra.infrastructure.continuations.CAgent"/>
+        <!-- </section> -->
+        </manifest>
+      </jar>
+    </target>
+
+    <!-- creates a release tarball -->	
+    <target name="release" depends="jar,javadoc">
+      <mkdir dir="${dist.dir}"/>
+      <copy todir="${dist.dir}/lib">
+        <fileset dir="${build.lib}"/>
+        <fileset dir="${build.dir}">
+          <include name="*.jar" />
+        </fileset>
+      </copy>
+      <copy todir="${dist.dir}/javadoc">
+        <fileset dir="${javadoc.dir}"/>
+      </copy>
+      <copy todir="${dist.dir}/bin">
+        <fileset dir="bin"/>
+      </copy>
+      <copy todir="${dist.dir}/conf">
+        <fileset dir="conf"/>
+      </copy>   
+      <copy todir="${dist.dir}/interface">
+        <fileset dir="interface">
+          <include name="**/*.thrift" />
+        </fileset>
+      </copy>      
+      <copy todir="${dist.dir}/">
+        <fileset dir="${basedir}">
+          <include name="*.txt" />
+        </fileset>
+      </copy> 
+      
+      <tar compression="gzip" longfile="gnu"
+        destfile="${build.dir}/${final.name}-bin.tar.gz">
+
+        <!-- Everything but bin/ (default mode) -->
+        <tarfileset dir="${dist.dir}" prefix="${final.name}">
+          <include name="**"/>
+          <exclude name="bin/*" />
+        </tarfileset>
+        <!-- Shell includes in bin/ (default mode) -->
+        <tarfileset dir="${dist.dir}" prefix="${final.name}">
+          <include name="bin/*.in.sh" />
+        </tarfileset>
+        <!-- Executable scripts in bin/ -->
+        <tarfileset dir="${dist.dir}" prefix="${final.name}" mode="755">
+          <include name="bin/*"/>
+          <not>
+        	<filename name="bin/*.in.sh" />
+          </not>
+        </tarfileset>	
+      </tar>
+      <tar compression="gzip" longfile="gnu"
+        destfile="${build.dir}/${final.name}-src.tar.gz">
+
+        <tarfileset dir="${basedir}"
+          prefix="${final.name}-src">
+          <include name="**"/>
+          <exclude name="build/**" />
+        </tarfileset>
+      </tar>
+    </target>
+
+  <target name="build-test" depends="build" description="Build the Cassandra classes">
+    <javac
+     debug="true"
+     debuglevel="${debuglevel}"
+     destdir="${test.classes}"
+    >
+      <classpath refid="cassandra.classpath"/>
+      <src path="${test.unit.src}"/>
+    </javac>
+  </target>
+
+   <target name="test" depends="build-test">
+    <echo message="running tests"/>
+    <mkdir dir="${build.test.dir}/cassandra"/>
+    <mkdir dir="${build.test.dir}/output"/>
+    <junit fork="on" failureproperty="testfailed">
+      <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}"/>
+      <formatter type="xml" usefile="true"/>
+      <formatter type="brief" usefile="false"/>
+      <jvmarg value="-Dstorage-config=${test.conf}"/>
+      <jvmarg value="-ea"/>
+      <classpath>
+        <path refid="cassandra.classpath" />
+        <pathelement location="${test.classes}"/>
+        <pathelement location="${cobertura.dir}/cobertura.jar"/>
+        <pathelement location="${test.conf}"/>
+      </classpath>
+      <batchtest todir="${build.test.dir}/output">
+        <fileset dir="${test.classes}" includes="**/${test.name}.class" />
+      </batchtest>
+    </junit>
+
+    <fail if="testfailed" message="Some test(s) failed."/>
+  </target>
+	
+  <!-- instruments the classes to later create code coverage reports -->
+  <target name="cobertura-instrument" depends="build,build-test">
+    <taskdef resource="tasks.properties">
+      <classpath>
+        <fileset dir="${cobertura.dir}">
+            <include name="cobertura.jar" />
+            <include name="lib/**/*.jar" />
+        </fileset>
+      </classpath>
+    </taskdef>
+    
+    <delete file="${cobertura.datafile}"/>
+    
+    <cobertura-instrument todir="${cobertura.classes.dir}" datafile="${cobertura.datafile}">
+      <ignore regex="org.apache.log4j.*"/>
+      
+      <fileset dir="${build.classes}">
+        <include name="**/*.class"/>
+        <exclude name="**/*Test.class"/>
+        <exclude name="**/*TestCase.class"/>
+        <exclude name="**/test/*.class"/>
+        <exclude name="${cobertura.excludes}"/>
+      </fileset>
+     
+    </cobertura-instrument>
+  </target>	
+
+  <!-- create both html and xml code coverage reports -->
+  <target name="cobertura-report">
+    <cobertura-report format="html" destdir="${cobertura.report.dir}" srcdir="${build.src}"
+      datafile="${cobertura.datafile}"/>
+    <cobertura-report format="xml" destdir="${cobertura.report.dir}" srcdir="${build.src}"
+      datafile="${cobertura.datafile}"/>
+  </target>	
+	
+  <target name="javadoc" depends="init">
+    <tstamp>
+      <format property="YEAR" pattern="yyyy"/>
+    </tstamp>
+    <javadoc destdir="${javadoc.dir}" author="true" version="true" use="true"
+      windowtitle="${ant.project.name} API" classpathref="cassandra.classpath"
+      bottom="Copyright &amp;copy; ${YEAR} The Apache Software Foundation">
+
+      <fileset dir="${build.src}" defaultexcludes="yes">
+        <include name="org/apache/**/*.java"/>
+      </fileset>
+    </javadoc>
+   </target>
+
+</project>

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/AIOExecutorService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/AIOExecutorService.java?rev=799331&r1=799330&r2=799331&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/AIOExecutorService.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/AIOExecutorService.java Thu Jul 30 15:30:21 2009
@@ -1,319 +1,319 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.cassandra.concurrent;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-public class AIOExecutorService implements ExecutorService
-{
-    private ExecutorService executorService_;
-    
-    public AIOExecutorService(int corePoolSize,
-            int maximumPoolSize,
-            long keepAliveTime,
-            TimeUnit unit,
-            BlockingQueue<Runnable> workQueue,
-            ThreadFactory threadFactory)
-    {
-        executorService_ = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory);        
-    }
-    
-    /**
-     * Executes the given command at some time in the future.  The command
-     * may execute in a new thread, in a pooled thread, or in the calling
-     * thread, at the discretion of the <tt>Executor</tt> implementation.
-     *
-     * @param command the runnable task
-     * @throws RejectedExecutionException if this task cannot be
-     * accepted for execution.
-     * @throws NullPointerException if command is null
-     */
-    public void execute(Runnable command)
-    {
-        executorService_.execute(command);
-    }
-    
-    /**
-     * Initiates an orderly shutdown in which previously submitted
-     * tasks are executed, but no new tasks will be accepted.
-     * Invocation has no additional effect if already shut down.
-     *
-     * <p>This method does not wait for previously submitted tasks to
-     * complete execution.  Use {@link #awaitTermination awaitTermination}
-     * to do that.
-     *
-     * @throws SecurityException if a security manager exists and
-     *         shutting down this ExecutorService may manipulate
-     *         threads that the caller is not permitted to modify
-     *         because it does not hold {@link
-     *         java.lang.RuntimePermission}<tt>("modifyThread")</tt>,
-     *         or the security manager's <tt>checkAccess</tt> method
-     *         denies access.
-     */
-    public void shutdown()
-    {    
-        /* This is a noop. */     
-    }
-
-    /**
-     * Attempts to stop all actively executing tasks, halts the
-     * processing of waiting tasks, and returns a list of the tasks
-     * that were awaiting execution.
-     *
-     * <p>This method does not wait for actively executing tasks to
-     * terminate.  Use {@link #awaitTermination awaitTermination} to
-     * do that.
-     *
-     * <p>There are no guarantees beyond best-effort attempts to stop
-     * processing actively executing tasks.  For example, typical
-     * implementations will cancel via {@link Thread#interrupt}, so any
-     * task that fails to respond to interrupts may never terminate.
-     *
-     * @return list of tasks that never commenced execution
-     * @throws SecurityException if a security manager exists and
-     *         shutting down this ExecutorService may manipulate
-     *         threads that the caller is not permitted to modify
-     *         because it does not hold {@link
-     *         java.lang.RuntimePermission}<tt>("modifyThread")</tt>,
-     *         or the security manager's <tt>checkAccess</tt> method
-     *         denies access.
-     */
-    public List<Runnable> shutdownNow()
-    {
-        return executorService_.shutdownNow();
-    }
-
-    /**
-     * Returns <tt>true</tt> if this executor has been shut down.
-     *
-     * @return <tt>true</tt> if this executor has been shut down
-     */
-    public boolean isShutdown()
-    {
-        return executorService_.isShutdown();
-    }
-
-    /**
-     * Returns <tt>true</tt> if all tasks have completed following shut down.
-     * Note that <tt>isTerminated</tt> is never <tt>true</tt> unless
-     * either <tt>shutdown</tt> or <tt>shutdownNow</tt> was called first.
-     *
-     * @return <tt>true</tt> if all tasks have completed following shut down
-     */
-    public boolean isTerminated()
-    {
-        return executorService_.isTerminated();
-    }
-
-    /**
-     * Blocks until all tasks have completed execution after a shutdown
-     * request, or the timeout occurs, or the current thread is
-     * interrupted, whichever happens first.
-     *
-     * @param timeout the maximum time to wait
-     * @param unit the time unit of the timeout argument
-     * @return <tt>true</tt> if this executor terminated and
-     *         <tt>false</tt> if the timeout elapsed before termination
-     * @throws InterruptedException if interrupted while waiting
-     */
-    public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
-    {
-        return executorService_.awaitTermination(timeout, unit);
-    }
-
-    /**
-     * Submits a value-returning task for execution and returns a
-     * Future representing the pending results of the task. The
-     * Future's <tt>get</tt> method will return the task's result upon
-     * successful completion.
-     *
-     * <p>
-     * If you would like to immediately block waiting
-     * for a task, you can use constructions of the form
-     * <tt>result = exec.submit(aCallable).get();</tt>
-     *
-     * <p> Note: The {@link Executors} class includes a set of methods
-     * that can convert some other common closure-like objects,
-     * for example, {@link java.security.PrivilegedAction} to
-     * {@link Callable} form so they can be submitted.
-     *
-     * @param task the task to submit
-     * @return a Future representing pending completion of the task
-     * @throws RejectedExecutionException if the task cannot be
-     *         scheduled for execution
-     * @throws NullPointerException if the task is null
-     */
-    public <T> Future<T> submit(Callable<T> task)
-    {
-        return executorService_.submit(task);
-    }
-
-    /**
-     * Submits a Runnable task for execution and returns a Future
-     * representing that task. The Future's <tt>get</tt> method will
-     * return the given result upon successful completion.
-     *
-     * @param task the task to submit
-     * @param result the result to return
-     * @return a Future representing pending completion of the task
-     * @throws RejectedExecutionException if the task cannot be
-     *         scheduled for execution
-     * @throws NullPointerException if the task is null
-     */
-    public <T> Future<T> submit(Runnable task, T result)
-    {
-        return executorService_.submit(task, result);
-    }
-
-    /**
-     * Submits a Runnable task for execution and returns a Future
-     * representing that task. The Future's <tt>get</tt> method will
-     * return <tt>null</tt> upon <em>successful</em> completion.
-     *
-     * @param task the task to submit
-     * @return a Future representing pending completion of the task
-     * @throws RejectedExecutionException if the task cannot be
-     *         scheduled for execution
-     * @throws NullPointerException if the task is null
-     */
-    public Future<?> submit(Runnable task)
-    {
-        return executorService_.submit(task);
-    }
-
-    /**
-     * Executes the given tasks, returning a list of Futures holding
-     * their status and results when all complete.
-     * {@link Future#isDone} is <tt>true</tt> for each
-     * element of the returned list.
-     * Note that a <em>completed</em> task could have
-     * terminated either normally or by throwing an exception.
-     * The results of this method are undefined if the given
-     * collection is modified while this operation is in progress.
-     *
-     * @param tasks the collection of tasks
-     * @return A list of Futures representing the tasks, in the same
-     *         sequential order as produced by the iterator for the
-     *         given task list, each of which has completed.
-     * @throws InterruptedException if interrupted while waiting, in
-     *         which case unfinished tasks are cancelled.
-     * @throws NullPointerException if tasks or any of its elements are <tt>null</tt>
-     * @throws RejectedExecutionException if any task cannot be
-     *         scheduled for execution
-     */
-
-    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
-    {
-        return executorService_.invokeAll(tasks);
-    }
-
-    /**
-     * Executes the given tasks, returning a list of Futures holding
-     * their status and results
-     * when all complete or the timeout expires, whichever happens first.
-     * {@link Future#isDone} is <tt>true</tt> for each
-     * element of the returned list.
-     * Upon return, tasks that have not completed are cancelled.
-     * Note that a <em>completed</em> task could have
-     * terminated either normally or by throwing an exception.
-     * The results of this method are undefined if the given
-     * collection is modified while this operation is in progress.
-     *
-     * @param tasks the collection of tasks
-     * @param timeout the maximum time to wait
-     * @param unit the time unit of the timeout argument
-     * @return a list of Futures representing the tasks, in the same
-     *         sequential order as produced by the iterator for the
-     *         given task list. If the operation did not time out,
-     *         each task will have completed. If it did time out, some
-     *         of these tasks will not have completed.
-     * @throws InterruptedException if interrupted while waiting, in
-     *         which case unfinished tasks are cancelled
-     * @throws NullPointerException if tasks, any of its elements, or
-     *         unit are <tt>null</tt>
-     * @throws RejectedExecutionException if any task cannot be scheduled
-     *         for execution
-     */
-    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
-    {
-        return executorService_.invokeAll(tasks, timeout, unit);
-    }
-    
-    /**
-     * Executes the given tasks, returning the result
-     * of one that has completed successfully (i.e., without throwing
-     * an exception), if any do. Upon normal or exceptional return,
-     * tasks that have not completed are cancelled.
-     * The results of this method are undefined if the given
-     * collection is modified while this operation is in progress.
-     *
-     * @param tasks the collection of tasks
-     * @return the result returned by one of the tasks
-     * @throws InterruptedException if interrupted while waiting
-     * @throws NullPointerException if tasks or any of its elements
-     *         are <tt>null</tt>
-     * @throws IllegalArgumentException if tasks is empty
-     * @throws ExecutionException if no task successfully completes
-     * @throws RejectedExecutionException if tasks cannot be scheduled
-     *         for execution
-     */
-    public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
-    {
-        return executorService_.invokeAny(tasks);
-    }
-
-    /**
-     * Executes the given tasks, returning the result
-     * of one that has completed successfully (i.e., without throwing
-     * an exception), if any do before the given timeout elapses.
-     * Upon normal or exceptional return, tasks that have not
-     * completed are cancelled.
-     * The results of this method are undefined if the given
-     * collection is modified while this operation is in progress.
-     *
-     * @param tasks the collection of tasks
-     * @param timeout the maximum time to wait
-     * @param unit the time unit of the timeout argument
-     * @return the result returned by one of the tasks.
-     * @throws InterruptedException if interrupted while waiting
-     * @throws NullPointerException if tasks, any of its elements, or
-     *         unit are <tt>null</tt>
-     * @throws TimeoutException if the given timeout elapses before
-     *         any task successfully completes
-     * @throws ExecutionException if no task successfully completes
-     * @throws RejectedExecutionException if tasks cannot be scheduled
-     *         for execution
-     */
-    public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
-    {
-        return executorService_.invokeAny(tasks, timeout, unit);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.concurrent;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class AIOExecutorService implements ExecutorService
+{
+    private ExecutorService executorService_;
+    
+    public AIOExecutorService(int corePoolSize,
+            int maximumPoolSize,
+            long keepAliveTime,
+            TimeUnit unit,
+            BlockingQueue<Runnable> workQueue,
+            ThreadFactory threadFactory)
+    {
+        executorService_ = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory);        
+    }
+    
+    /**
+     * Executes the given command at some time in the future.  The command
+     * may execute in a new thread, in a pooled thread, or in the calling
+     * thread, at the discretion of the <tt>Executor</tt> implementation.
+     *
+     * @param command the runnable task
+     * @throws RejectedExecutionException if this task cannot be
+     * accepted for execution.
+     * @throws NullPointerException if command is null
+     */
+    public void execute(Runnable command)
+    {
+        executorService_.execute(command);
+    }
+    
+    /**
+     * Initiates an orderly shutdown in which previously submitted
+     * tasks are executed, but no new tasks will be accepted.
+     * Invocation has no additional effect if already shut down.
+     *
+     * <p>This method does not wait for previously submitted tasks to
+     * complete execution.  Use {@link #awaitTermination awaitTermination}
+     * to do that.
+     *
+     * @throws SecurityException if a security manager exists and
+     *         shutting down this ExecutorService may manipulate
+     *         threads that the caller is not permitted to modify
+     *         because it does not hold {@link
+     *         java.lang.RuntimePermission}<tt>("modifyThread")</tt>,
+     *         or the security manager's <tt>checkAccess</tt> method
+     *         denies access.
+     */
+    public void shutdown()
+    {    
+        /* This is a noop. */     
+    }
+
+    /**
+     * Attempts to stop all actively executing tasks, halts the
+     * processing of waiting tasks, and returns a list of the tasks
+     * that were awaiting execution.
+     *
+     * <p>This method does not wait for actively executing tasks to
+     * terminate.  Use {@link #awaitTermination awaitTermination} to
+     * do that.
+     *
+     * <p>There are no guarantees beyond best-effort attempts to stop
+     * processing actively executing tasks.  For example, typical
+     * implementations will cancel via {@link Thread#interrupt}, so any
+     * task that fails to respond to interrupts may never terminate.
+     *
+     * @return list of tasks that never commenced execution
+     * @throws SecurityException if a security manager exists and
+     *         shutting down this ExecutorService may manipulate
+     *         threads that the caller is not permitted to modify
+     *         because it does not hold {@link
+     *         java.lang.RuntimePermission}<tt>("modifyThread")</tt>,
+     *         or the security manager's <tt>checkAccess</tt> method
+     *         denies access.
+     */
+    public List<Runnable> shutdownNow()
+    {
+        return executorService_.shutdownNow();
+    }
+
+    /**
+     * Returns <tt>true</tt> if this executor has been shut down.
+     *
+     * @return <tt>true</tt> if this executor has been shut down
+     */
+    public boolean isShutdown()
+    {
+        return executorService_.isShutdown();
+    }
+
+    /**
+     * Returns <tt>true</tt> if all tasks have completed following shut down.
+     * Note that <tt>isTerminated</tt> is never <tt>true</tt> unless
+     * either <tt>shutdown</tt> or <tt>shutdownNow</tt> was called first.
+     *
+     * @return <tt>true</tt> if all tasks have completed following shut down
+     */
+    public boolean isTerminated()
+    {
+        return executorService_.isTerminated();
+    }
+
+    /**
+     * Blocks until all tasks have completed execution after a shutdown
+     * request, or the timeout occurs, or the current thread is
+     * interrupted, whichever happens first.
+     *
+     * @param timeout the maximum time to wait
+     * @param unit the time unit of the timeout argument
+     * @return <tt>true</tt> if this executor terminated and
+     *         <tt>false</tt> if the timeout elapsed before termination
+     * @throws InterruptedException if interrupted while waiting
+     */
+    public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
+    {
+        return executorService_.awaitTermination(timeout, unit);
+    }
+
+    /**
+     * Submits a value-returning task for execution and returns a
+     * Future representing the pending results of the task. The
+     * Future's <tt>get</tt> method will return the task's result upon
+     * successful completion.
+     *
+     * <p>
+     * If you would like to immediately block waiting
+     * for a task, you can use constructions of the form
+     * <tt>result = exec.submit(aCallable).get();</tt>
+     *
+     * <p> Note: The {@link Executors} class includes a set of methods
+     * that can convert some other common closure-like objects,
+     * for example, {@link java.security.PrivilegedAction} to
+     * {@link Callable} form so they can be submitted.
+     *
+     * @param task the task to submit
+     * @return a Future representing pending completion of the task
+     * @throws RejectedExecutionException if the task cannot be
+     *         scheduled for execution
+     * @throws NullPointerException if the task is null
+     */
+    public <T> Future<T> submit(Callable<T> task)
+    {
+        return executorService_.submit(task);
+    }
+
+    /**
+     * Submits a Runnable task for execution and returns a Future
+     * representing that task. The Future's <tt>get</tt> method will
+     * return the given result upon successful completion.
+     *
+     * @param task the task to submit
+     * @param result the result to return
+     * @return a Future representing pending completion of the task
+     * @throws RejectedExecutionException if the task cannot be
+     *         scheduled for execution
+     * @throws NullPointerException if the task is null
+     */
+    public <T> Future<T> submit(Runnable task, T result)
+    {
+        return executorService_.submit(task, result);
+    }
+
+    /**
+     * Submits a Runnable task for execution and returns a Future
+     * representing that task. The Future's <tt>get</tt> method will
+     * return <tt>null</tt> upon <em>successful</em> completion.
+     *
+     * @param task the task to submit
+     * @return a Future representing pending completion of the task
+     * @throws RejectedExecutionException if the task cannot be
+     *         scheduled for execution
+     * @throws NullPointerException if the task is null
+     */
+    public Future<?> submit(Runnable task)
+    {
+        return executorService_.submit(task);
+    }
+
+    /**
+     * Executes the given tasks, returning a list of Futures holding
+     * their status and results when all complete.
+     * {@link Future#isDone} is <tt>true</tt> for each
+     * element of the returned list.
+     * Note that a <em>completed</em> task could have
+     * terminated either normally or by throwing an exception.
+     * The results of this method are undefined if the given
+     * collection is modified while this operation is in progress.
+     *
+     * @param tasks the collection of tasks
+     * @return A list of Futures representing the tasks, in the same
+     *         sequential order as produced by the iterator for the
+     *         given task list, each of which has completed.
+     * @throws InterruptedException if interrupted while waiting, in
+     *         which case unfinished tasks are cancelled.
+     * @throws NullPointerException if tasks or any of its elements are <tt>null</tt>
+     * @throws RejectedExecutionException if any task cannot be
+     *         scheduled for execution
+     */
+
+    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
+    {
+        return executorService_.invokeAll(tasks);
+    }
+
+    /**
+     * Executes the given tasks, returning a list of Futures holding
+     * their status and results
+     * when all complete or the timeout expires, whichever happens first.
+     * {@link Future#isDone} is <tt>true</tt> for each
+     * element of the returned list.
+     * Upon return, tasks that have not completed are cancelled.
+     * Note that a <em>completed</em> task could have
+     * terminated either normally or by throwing an exception.
+     * The results of this method are undefined if the given
+     * collection is modified while this operation is in progress.
+     *
+     * @param tasks the collection of tasks
+     * @param timeout the maximum time to wait
+     * @param unit the time unit of the timeout argument
+     * @return a list of Futures representing the tasks, in the same
+     *         sequential order as produced by the iterator for the
+     *         given task list. If the operation did not time out,
+     *         each task will have completed. If it did time out, some
+     *         of these tasks will not have completed.
+     * @throws InterruptedException if interrupted while waiting, in
+     *         which case unfinished tasks are cancelled
+     * @throws NullPointerException if tasks, any of its elements, or
+     *         unit are <tt>null</tt>
+     * @throws RejectedExecutionException if any task cannot be scheduled
+     *         for execution
+     */
+    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
+    {
+        return executorService_.invokeAll(tasks, timeout, unit);
+    }
+    
+    /**
+     * Executes the given tasks, returning the result
+     * of one that has completed successfully (i.e., without throwing
+     * an exception), if any do. Upon normal or exceptional return,
+     * tasks that have not completed are cancelled.
+     * The results of this method are undefined if the given
+     * collection is modified while this operation is in progress.
+     *
+     * @param tasks the collection of tasks
+     * @return the result returned by one of the tasks
+     * @throws InterruptedException if interrupted while waiting
+     * @throws NullPointerException if tasks or any of its elements
+     *         are <tt>null</tt>
+     * @throws IllegalArgumentException if tasks is empty
+     * @throws ExecutionException if no task successfully completes
+     * @throws RejectedExecutionException if tasks cannot be scheduled
+     *         for execution
+     */
+    public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
+    {
+        return executorService_.invokeAny(tasks);
+    }
+
+    /**
+     * Executes the given tasks, returning the result
+     * of one that has completed successfully (i.e., without throwing
+     * an exception), if any do before the given timeout elapses.
+     * Upon normal or exceptional return, tasks that have not
+     * completed are cancelled.
+     * The results of this method are undefined if the given
+     * collection is modified while this operation is in progress.
+     *
+     * @param tasks the collection of tasks
+     * @param timeout the maximum time to wait
+     * @param unit the time unit of the timeout argument
+     * @return the result returned by one of the tasks.
+     * @throws InterruptedException if interrupted while waiting
+     * @throws NullPointerException if tasks, any of its elements, or
+     *         unit are <tt>null</tt>
+     * @throws TimeoutException if the given timeout elapses before
+     *         any task successfully completes
+     * @throws ExecutionException if no task successfully completes
+     * @throws RejectedExecutionException if tasks cannot be scheduled
+     *         for execution
+     */
+    public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
+    {
+        return executorService_.invokeAny(tasks, timeout, unit);
+    }
+}

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/Context.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/Context.java?rev=799331&r1=799330&r2=799331&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/Context.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/Context.java Thu Jul 30 15:30:21 2009
@@ -1,52 +1,52 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.cassandra.concurrent;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Context object adding a collection of key/value pairs into ThreadLocalContext.
- * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
- */
-
-public class Context
-{
-    private Map<Object, Object> ht_;
-    
-    public Context()
-    {
-        ht_ = new HashMap<Object, Object>();
-    }
-    
-    public Object put(Object key, Object value)
-    {
-        return ht_.put(key, value);
-    }
-    
-    public Object get(Object key)
-    {
-        return ht_.get(key);
-    }
-    
-    public void remove(Object key)
-    {
-        ht_.remove(key);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.concurrent;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Context object adding a collection of key/value pairs into ThreadLocalContext.
+ * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
+ */
+
+public class Context
+{
+    private Map<Object, Object> ht_;
+    
+    public Context()
+    {
+        ht_ = new HashMap<Object, Object>();
+    }
+    
+    public Object put(Object key, Object value)
+    {
+        return ht_.put(key, value);
+    }
+    
+    public Object get(Object key)
+    {
+        return ht_.get(key);
+    }
+    
+    public void remove(Object key)
+    {
+        ht_.remove(key);
+    }
+}

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationContext.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationContext.java?rev=799331&r1=799330&r2=799331&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationContext.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationContext.java Thu Jul 30 15:30:21 2009
@@ -1,52 +1,52 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.cassandra.concurrent;
-
-import org.apache.commons.javaflow.Continuation;
-
-public class ContinuationContext
-{
-    private Continuation continuation_;
-    private Object result_;
-    
-    public ContinuationContext(Continuation continuation)
-    {
-        continuation_ = continuation;        
-    }
-    
-    public Continuation getContinuation()
-    {
-        return continuation_;
-    }
-    
-    public void setContinuation(Continuation continuation)
-    {
-        continuation_ = continuation;
-    }
-    
-    public Object result()
-    {
-        return result_;
-    }
-    
-    public void result(Object result)
-    {
-        result_ = result;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.concurrent;
+
+import org.apache.commons.javaflow.Continuation;
+
+public class ContinuationContext
+{
+    private Continuation continuation_;
+    private Object result_;
+    
+    public ContinuationContext(Continuation continuation)
+    {
+        continuation_ = continuation;        
+    }
+    
+    public Continuation getContinuation()
+    {
+        return continuation_;
+    }
+    
+    public void setContinuation(Continuation continuation)
+    {
+        continuation_ = continuation;
+    }
+    
+    public Object result()
+    {
+        return result_;
+    }
+    
+    public void result(Object result)
+    {
+        result_ = result;
+    }
+}

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationStage.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationStage.java?rev=799331&r1=799330&r2=799331&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationStage.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/ContinuationStage.java Thu Jul 30 15:30:21 2009
@@ -1,89 +1,89 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.cassandra.concurrent;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
-
-public class ContinuationStage implements IStage
-{
-    private String name_;
-    private ContinuationsExecutor executorService_;
-            
-    public ContinuationStage(String name, int numThreads)
-    {        
-        name_ = name;        
-        executorService_ = new ContinuationsExecutor( numThreads,
-                numThreads,
-                Integer.MAX_VALUE,
-                TimeUnit.SECONDS,
-                new LinkedBlockingQueue<Runnable>(),
-                new ThreadFactoryImpl(name)
-                );        
-    }
-    
-    public String getName() 
-    {        
-        return name_;
-    }
-    
-    public ExecutorService getInternalThreadPool()
-    {
-        return executorService_;
-    }
-
-    public Future<Object> execute(Callable<Object> callable) {
-        return executorService_.submit(callable);
-    }
-    
-    public void execute(Runnable runnable) {
-        executorService_.execute(runnable);
-    }
-    
-    public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
-    {
-        throw new UnsupportedOperationException("This operation is not supported");
-    }
-    
-    public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
-        throw new UnsupportedOperationException("This operation is not supported");
-    }
-    
-    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
-        throw new UnsupportedOperationException("This operation is not supported");
-    }
-    
-    public void shutdown() {  
-        executorService_.shutdownNow(); 
-    }
-    
-    public boolean isShutdown()
-    {
-        return executorService_.isShutdown();
-    }
-    
-    public long getPendingTasks(){
-        return (executorService_.getTaskCount() - executorService_.getCompletedTaskCount());
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.concurrent;
+
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+
+public class ContinuationStage implements IStage
+{
+    private String name_;
+    private ContinuationsExecutor executorService_;
+            
+    public ContinuationStage(String name, int numThreads)
+    {        
+        name_ = name;        
+        executorService_ = new ContinuationsExecutor( numThreads,
+                numThreads,
+                Integer.MAX_VALUE,
+                TimeUnit.SECONDS,
+                new LinkedBlockingQueue<Runnable>(),
+                new ThreadFactoryImpl(name)
+                );        
+    }
+    
+    public String getName() 
+    {        
+        return name_;
+    }
+    
+    public ExecutorService getInternalThreadPool()
+    {
+        return executorService_;
+    }
+
+    public Future<Object> execute(Callable<Object> callable) {
+        return executorService_.submit(callable);
+    }
+    
+    public void execute(Runnable runnable) {
+        executorService_.execute(runnable);
+    }
+    
+    public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
+    {
+        throw new UnsupportedOperationException("This operation is not supported");
+    }
+    
+    public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
+        throw new UnsupportedOperationException("This operation is not supported");
+    }
+    
+    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
+        throw new UnsupportedOperationException("This operation is not supported");
+    }
+    
+    public void shutdown() {  
+        executorService_.shutdownNow(); 
+    }
+    
+    public boolean isShutdown()
+    {
+        return executorService_.isShutdown();
+    }
+    
+    public long getPendingTasks(){
+        return (executorService_.getTaskCount() - executorService_.getCompletedTaskCount());
+    }
+}

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java?rev=799331&r1=799330&r2=799331&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java Thu Jul 30 15:30:21 2009
@@ -1,76 +1,76 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.cassandra.concurrent;
-
-import java.util.concurrent.*;
-
-import org.apache.cassandra.utils.LogUtil;
-import org.apache.log4j.Logger;
-import org.apache.cassandra.utils.*;
-
-/**
- * This is a wrapper class for the <i>ScheduledThreadPoolExecutor</i>. It provides an implementation
- * for the <i>afterExecute()</i> found in the <i>ThreadPoolExecutor</i> class to log any unexpected 
- * Runtime Exceptions.
- * 
- * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
- */
-public final class DebuggableScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
-{
-    private static Logger logger_ = Logger.getLogger(DebuggableScheduledThreadPoolExecutor.class);
-    
-    public DebuggableScheduledThreadPoolExecutor(int threads,
-            ThreadFactory threadFactory)
-    {
-        super(threads, threadFactory);        
-    }
-    
-    /**
-     *  (non-Javadoc)
-     * @see java.util.concurrent.ThreadPoolExecutor#afterExecute(java.lang.Runnable, java.lang.Throwable)
-     */
-    public void afterExecute(Runnable r, Throwable t)
-    {
-        super.afterExecute(r,t);
-        if ( t != null )
-        {  
-            Context ctx = ThreadLocalContext.get();
-            if ( ctx != null )
-            {
-                Object object = ctx.get(r.getClass().getName());
-                
-                if ( object != null )
-                {
-                    logger_.info("**** In afterExecute() " + t.getClass().getName() + " occured while working with " + object + " ****");
-                }
-                else
-                {
-                    logger_.info("**** In afterExecute() " + t.getClass().getName() + " occured ****");
-                }
-            }
-            
-            Throwable cause = t.getCause();
-            if ( cause != null )
-            {
-                logger_.info( LogUtil.throwableToString(cause) );
-            }
-            logger_.info( LogUtil.throwableToString(t) );
-        }
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.concurrent;
+
+import java.util.concurrent.*;
+
+import org.apache.cassandra.utils.LogUtil;
+import org.apache.log4j.Logger;
+import org.apache.cassandra.utils.*;
+
+/**
+ * This is a wrapper class for the <i>ScheduledThreadPoolExecutor</i>. It provides an implementation
+ * for the <i>afterExecute()</i> found in the <i>ThreadPoolExecutor</i> class to log any unexpected 
+ * Runtime Exceptions.
+ * 
+ * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
+ */
+public final class DebuggableScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
+{
+    private static Logger logger_ = Logger.getLogger(DebuggableScheduledThreadPoolExecutor.class);
+    
+    public DebuggableScheduledThreadPoolExecutor(int threads,
+            ThreadFactory threadFactory)
+    {
+        super(threads, threadFactory);        
+    }
+    
+    /**
+     *  (non-Javadoc)
+     * @see java.util.concurrent.ThreadPoolExecutor#afterExecute(java.lang.Runnable, java.lang.Throwable)
+     */
+    public void afterExecute(Runnable r, Throwable t)
+    {
+        super.afterExecute(r,t);
+        if ( t != null )
+        {  
+            Context ctx = ThreadLocalContext.get();
+            if ( ctx != null )
+            {
+                Object object = ctx.get(r.getClass().getName());
+                
+                if ( object != null )
+                {
+                    logger_.info("**** In afterExecute() " + t.getClass().getName() + " occured while working with " + object + " ****");
+                }
+                else
+                {
+                    logger_.info("**** In afterExecute() " + t.getClass().getName() + " occured ****");
+                }
+            }
+            
+            Throwable cause = t.getCause();
+            if ( cause != null )
+            {
+                logger_.info( LogUtil.throwableToString(cause) );
+            }
+            logger_.info( LogUtil.throwableToString(t) );
+        }
+    }
+}



Mime
View raw message