activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r712224 [1/3] - in /activemq/sandbox/kahadb: ./ src/main/java/org/apache/kahadb/ src/main/java/org/apache/kahadb/index/ src/main/java/org/apache/kahadb/journal/ src/main/java/org/apache/kahadb/page/ src/main/java/org/apache/kahadb/replicati...
Date Fri, 07 Nov 2008 19:00:29 GMT
Author: chirino
Date: Fri Nov  7 11:00:25 2008
New Revision: 712224

URL: http://svn.apache.org/viewvc?rev=712224&view=rev
Log:
Setting some eol style stuff

Modified:
    activemq/sandbox/kahadb/pom.xml   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Accessor.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Container.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Extent.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Store.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Transaction.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeNode.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeVisitor.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessorPool.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyDataFile.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyJournal.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/package.html   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/package.html   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Transaction.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationServer.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationSlave.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/StaticClusterStateManager.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/transport/KDBRTransportFactory.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/transport/KDBRWireFormat.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/transport/KDBRWireFormatFactory.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/JournalCommand.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/KahaDBStore.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/MessageDatabase.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/Visitor.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayInputStream.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/ByteArrayOutputStream.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/ByteSequence.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/CommandLineSupport.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayInputStream.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/DataByteArrayOutputStream.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/DiskBenchmark.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/HexSupport.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/IOExceptionSupport.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/IOHelper.java   (contents, props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/IntrospectionSupport.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/LRUCache.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/LinkedNodeList.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/Scheduler.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/SchedulerTimerTask.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/Sequence.java   (props changed)
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/util/SequenceSet.java   (props changed)
    activemq/sandbox/kahadb/src/main/proto/journal-data.proto   (props changed)
    activemq/sandbox/kahadb/src/main/proto/kahadb-replication.proto   (contents, props changed)
    activemq/sandbox/kahadb/src/main/resources/META-INF/services/org/apache/activemq/transport/kdbr   (contents, props changed)
    activemq/sandbox/kahadb/src/main/resources/META-INF/services/org/apache/activemq/wireformat/kdbr   (contents, props changed)
    activemq/sandbox/kahadb/src/test/eclipse-resources/log4j.properties   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexBenchMark.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/index/BTreeIndexTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/index/HashIndexBenchMark.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/index/HashIndexTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/index/IndexBenchmark.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/index/IndexTestSupport.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/journal/JournalTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/journal/NioJournalTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/page/PageFileTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/replication/ReplicationTest.java   (contents, props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/replication/transport/KDBRTransportTest.java   (contents, props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaDBStoreBrokerTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaDBStoreRecoveryBrokerTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/KahaDBStoreXARecoveryBrokerTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/perf/KahaBulkLoadingTest.java   (props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/perf/KahaStoreDurableTopicTest.java   (contents, props changed)
    activemq/sandbox/kahadb/src/test/java/org/apache/kahadb/store/perf/KahaStoreQueueTest.java   (contents, props changed)
    activemq/sandbox/kahadb/src/test/resources/log4j.properties   (props changed)

Propchange: activemq/sandbox/kahadb/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Accessor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java Fri Nov  7 11:00:25 2008
@@ -23,7 +23,7 @@
 /**
  * Implementation of a Marshaller for byte arrays
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public class BytesMarshaller implements Marshaller {
     /**

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/BytesMarshaller.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Container.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Container.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Container.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Container.java Fri Nov  7 11:00:25 2008
@@ -23,7 +23,7 @@
 /**
  * Represents a container of persistent objects in the Kahadb Store
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  * @param <V>
  * @param <K>
  */

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Container.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Extent.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java Fri Nov  7 11:00:25 2008
@@ -23,7 +23,7 @@
 /**
  * Implementation of a Marshaller for a Integer
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public class IntegerMarshaller implements Marshaller<Integer> {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/IntegerMarshaller.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java Fri Nov  7 11:00:25 2008
@@ -23,7 +23,7 @@
 /**
  * Implementation of a Marshaller for a Long
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public class LongMarshaller implements Marshaller<Long> {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/LongMarshaller.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java Fri Nov  7 11:00:25 2008
@@ -23,7 +23,7 @@
 /**
  *Marshaller for marshalling in/out objects to a RawContainer
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public interface Marshaller<T> {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Marshaller.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java Fri Nov  7 11:00:25 2008
@@ -27,7 +27,7 @@
 /**
  * Implementation of a Marshaller for Objects
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public class ObjectMarshaller implements Marshaller {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/ObjectMarshaller.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Store.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Store.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Store.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Store.java Fri Nov  7 11:00:25 2008
@@ -22,7 +22,7 @@
 /**
  * A Store is holds persistent containers
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public interface Store {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Store.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java Fri Nov  7 11:00:25 2008
@@ -23,7 +23,7 @@
 /**
  * Implementation of a Marshaller for Strings
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public class StringMarshaller implements Marshaller<String> {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/StringMarshaller.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/Transaction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java Fri Nov  7 11:00:25 2008
@@ -59,7 +59,7 @@
  * implementation, and so it is entirely possible for a leaf page to be
  * completely empty after all of its keys have been removed.
  *
- * @version $Revision: 541508 $, $Date: 2007-05-24 21:54:12 -0400 (Thu, 24 May 2007) $
+ * @version $Revision$, $Date$
  */
 public class BTreeIndex<Key,Value> implements Index<Key,Value> {
 
@@ -68,7 +68,7 @@
     /**
      * Interface used to determine the simple prefix of two keys.
      *
-     * @version $Revision: 541508 $, $Date: 2007-05-24 21:54:12 -0400 (Thu, 24 May 2007) $
+     * @version $Revision$, $Date$
      */
     static public interface Prefixer<Key> {
         

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeIndex.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeNode.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/BTreeVisitor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java Fri Nov  7 11:00:25 2008
@@ -30,7 +30,7 @@
 /**
  * Bin in a HashIndex
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 class HashBin<Key, Value> {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashBin.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java Fri Nov  7 11:00:25 2008
@@ -35,7 +35,7 @@
 /**
  * BTree implementation
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 public class HashIndex<Key,Value> implements Index<Key,Value> {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/HashIndex.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java Fri Nov  7 11:00:25 2008
@@ -26,7 +26,7 @@
 /**
  * Simpler than a Map
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public interface Index<Key,Value> {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/index/Index.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java Fri Nov  7 11:00:25 2008
@@ -31,7 +31,7 @@
  * middle of the write of the first or second record do not not result in an
  * unknown state.
  * 
- * @version $Revision: 1.1 $
+ * @version $Revision$
  */
 public final class ControlFile {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ControlFile.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java Fri Nov  7 11:00:25 2008
@@ -27,7 +27,7 @@
 /**
  * DataFile
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 public class DataFile extends LinkedNode<DataFile> implements Comparable<DataFile> {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFile.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java Fri Nov  7 11:00:25 2008
@@ -28,7 +28,7 @@
  * Optimized Store reader and updater. Single threaded and synchronous. Use in
  * conjunction with the DataFileAccessorPool of concurrent use.
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 final class DataFileAccessor {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessorPool.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAccessorPool.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java Fri Nov  7 11:00:25 2008
@@ -32,7 +32,7 @@
  * safe and gains throughput as you increase the number of concurrent writes it
  * does.
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 class DataFileAppender {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java Fri Nov  7 11:00:25 2008
@@ -49,7 +49,7 @@
 /**
  * Manages DataFiles
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 public class Journal {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Journal.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java Fri Nov  7 11:00:25 2008
@@ -24,7 +24,7 @@
 /**
  * Used as a location in the data store.
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision$
  */
 public final class Location implements Comparable<Location> {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/Location.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java Fri Nov  7 11:00:25 2008
@@ -25,7 +25,7 @@
  * An AsyncDataFileAppender that uses NIO ByteBuffers and File chanels to more
  * efficently copy data to files.
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 class NIODataFileAppender extends DataFileAppender {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/NIODataFileAppender.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyDataFile.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyDataFile.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyJournal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/ReadOnlyJournal.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/journal/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java Fri Nov  7 11:00:25 2008
@@ -31,7 +31,7 @@
 /**
  * A Page within a file.
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 public class Page<T> {
 

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Page.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java Fri Nov  7 11:00:25 2008
@@ -61,7 +61,7 @@
  * Recovery Buffer Space: Page Size * 1000 : This is a redo log used to prevent partial page writes from making the file inconsistent
  * Page Space: The pages in the page file.
  * 
- * @version $Revision: 1.1.1.1 $
+ * @version $Revision$
  */
 public class PageFile {
     

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/PageFile.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Transaction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/page/Transaction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java Fri Nov  7 11:00:25 2008
@@ -1,23 +1,23 @@
-/**
- * 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.kahadb.replication;
-
-public interface ClusterListener {
-	
-	public void onClusterChange(ClusterState config);
-
-}
+/**
+ * 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.kahadb.replication;
+
+public interface ClusterListener {
+	
+	public void onClusterChange(ClusterState config);
+
+}

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java Fri Nov  7 11:00:25 2008
@@ -1,40 +1,40 @@
-/**
- * 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.kahadb.replication;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ClusterState {
-
-	private List<String> slaves = new ArrayList<String>();
-	private String master;
-	
-	public List<String> getSlaves() {
-		return slaves;
-	}
-	public void setSlaves(List<String> slaves) {
-		this.slaves = slaves;
-	}
-	public String getMaster() {
-		return master;
-	}
-	public void setMaster(String master) {
-		this.master = master;
-	}
-	
-}
+/**
+ * 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.kahadb.replication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ClusterState {
+
+	private List<String> slaves = new ArrayList<String>();
+	private String master;
+	
+	public List<String> getSlaves() {
+		return slaves;
+	}
+	public void setSlaves(List<String> slaves) {
+		this.slaves = slaves;
+	}
+	public String getMaster() {
+		return master;
+	}
+	public void setMaster(String master) {
+		this.master = master;
+	}
+	
+}

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterState.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java Fri Nov  7 11:00:25 2008
@@ -1,26 +1,26 @@
-/**
- * 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.kahadb.replication;
-
-import org.apache.activemq.Service;
-
-public interface ClusterStateManager extends Service {
-
-	void addListener(ClusterListener listener);
-	void removeListener(ClusterListener listener);
-
-}
+/**
+ * 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.kahadb.replication;
+
+import org.apache.activemq.Service;
+
+public interface ClusterStateManager extends Service {
+
+	void addListener(ClusterListener listener);
+	void removeListener(ClusterListener listener);
+
+}

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ClusterStateManager.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java Fri Nov  7 11:00:25 2008
@@ -1,82 +1,82 @@
-/**
- * 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.kahadb.replication;
-
-import java.io.IOException;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.PersistenceAdapter;
-import org.apache.kahadb.store.KahaDBStore;
-
-/**
- *  
- * @author chirino
- */
-public class ReplicatedBrokerService extends BrokerService {
-
-	ReplicationServer replicationServer = new ReplicationServer();
-	
-	public ReplicationServer getReplicationServer() {
-		return replicationServer;
-	}
-
-	public void setReplicationServer(ReplicationServer replicationServer) {
-		this.replicationServer = replicationServer;
-	}
-
-	@Override
-	public void start() throws Exception {
-		replicationServer.setBrokerService(this);
-		replicationServer.setStore((KahaDBStore) getPersistenceAdapter());
-		replicationServer.start();
-	}
-	
-	@Override
-	public void stop() throws Exception {
-		replicationServer.stop();
-	}
-	
-	
-	public void startMaster() throws Exception {
-		super.start();
-	}
-
-	public void stopMaster() throws Exception {
-		super.stop();
-	}
-
-	@Override
-	protected PersistenceAdapter createPersistenceAdapter() throws IOException {
-        if (isPersistent()) {
-        	KahaDBStore rc = new KahaDBStore();
-        	rc.setBrokerName(getBrokerName());
-        	rc.setDirectory(this.getDataDirectoryFile());
-			return rc;
-        } else {
-        	throw new IOException("The Replicated Broker Service does not support disabling persistence");
-        }
-	}
-	
-	@Override
-	public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) throws IOException {
-		if( !(persistenceAdapter instanceof KahaDBStore) ) {
-			throw new IOException("The Replicated Broker Service only supports the KahaDBStore PersistenceAdapter");
-		}
-		super.setPersistenceAdapter(persistenceAdapter);
-	}
-	
-}
+/**
+ * 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.kahadb.replication;
+
+import java.io.IOException;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.PersistenceAdapter;
+import org.apache.kahadb.store.KahaDBStore;
+
+/**
+ *  
+ * @author chirino
+ */
+public class ReplicatedBrokerService extends BrokerService {
+
+	ReplicationServer replicationServer = new ReplicationServer();
+	
+	public ReplicationServer getReplicationServer() {
+		return replicationServer;
+	}
+
+	public void setReplicationServer(ReplicationServer replicationServer) {
+		this.replicationServer = replicationServer;
+	}
+
+	@Override
+	public void start() throws Exception {
+		replicationServer.setBrokerService(this);
+		replicationServer.setStore((KahaDBStore) getPersistenceAdapter());
+		replicationServer.start();
+	}
+	
+	@Override
+	public void stop() throws Exception {
+		replicationServer.stop();
+	}
+	
+	
+	public void startMaster() throws Exception {
+		super.start();
+	}
+
+	public void stopMaster() throws Exception {
+		super.stop();
+	}
+
+	@Override
+	protected PersistenceAdapter createPersistenceAdapter() throws IOException {
+        if (isPersistent()) {
+        	KahaDBStore rc = new KahaDBStore();
+        	rc.setBrokerName(getBrokerName());
+        	rc.setDirectory(this.getDataDirectoryFile());
+			return rc;
+        } else {
+        	throw new IOException("The Replicated Broker Service does not support disabling persistence");
+        }
+	}
+	
+	@Override
+	public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) throws IOException {
+		if( !(persistenceAdapter instanceof KahaDBStore) ) {
+			throw new IOException("The Replicated Broker Service only supports the KahaDBStore PersistenceAdapter");
+		}
+		super.setPersistenceAdapter(persistenceAdapter);
+	}
+	
+}

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicatedBrokerService.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java Fri Nov  7 11:00:25 2008
@@ -1,40 +1,40 @@
-/**
- * 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.kahadb.replication;
-
-import org.apache.kahadb.replication.pb.PBHeader;
-
-public class ReplicationFrame {
-	
-	PBHeader header;
-	Object payload;
-	
-	public PBHeader getHeader() {
-		return header;
-	}
-	public void setHeader(PBHeader header) {
-		this.header = header;
-	}
-	
-	public Object getPayload() {
-		return payload;
-	}
-	public void setPayload(Object payload) {
-		this.payload = payload;
-	}
-	
-}
+/**
+ * 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.kahadb.replication;
+
+import org.apache.kahadb.replication.pb.PBHeader;
+
+public class ReplicationFrame {
+	
+	PBHeader header;
+	Object payload;
+	
+	public PBHeader getHeader() {
+		return header;
+	}
+	public void setHeader(PBHeader header) {
+		this.header = header;
+	}
+	
+	public Object getPayload() {
+		return payload;
+	}
+	public void setPayload(Object payload) {
+		this.payload = payload;
+	}
+	
+}

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationFrame.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java Fri Nov  7 11:00:25 2008
@@ -1,308 +1,308 @@
-/**
- * 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.kahadb.replication;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.zip.Adler32;
-import java.util.zip.Checksum;
-
-import org.apache.activemq.Service;
-import org.apache.activemq.transport.Transport;
-import org.apache.activemq.transport.TransportAcceptListener;
-import org.apache.activemq.transport.TransportFactory;
-import org.apache.activemq.transport.TransportListener;
-import org.apache.activemq.transport.TransportServer;
-import org.apache.activemq.util.Callback;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.kahadb.journal.DataFile;
-import org.apache.kahadb.journal.Location;
-import org.apache.kahadb.replication.pb.PBFileInfo;
-import org.apache.kahadb.replication.pb.PBHeader;
-import org.apache.kahadb.replication.pb.PBJournalLocation;
-import org.apache.kahadb.replication.pb.PBSlaveInit;
-import org.apache.kahadb.replication.pb.PBSlaveInitResponse;
-import org.apache.kahadb.replication.pb.PBType;
-import org.apache.kahadb.store.KahaDBStore;
-
-public class ReplicationMaster implements Service, ClusterListener {
-
-	private static final Log LOG = LogFactory.getLog(ReplicationServer.class);
-
-	private final ReplicationServer replicationServer;
-
-	private Object serverMutex = new Object() {
-	};
-	private TransportServer server;
-	private ArrayList<ReplicationSession> sessions = new ArrayList<ReplicationSession>();
-
-	public ReplicationMaster(ReplicationServer replication1Server) {
-		this.replicationServer = replication1Server;
-	}
-
-	public void start() throws Exception {
-		synchronized (serverMutex) {
-			server = TransportFactory.bind(new URI(replicationServer.getNodeId()));
-			server.setAcceptListener(new TransportAcceptListener() {
-				public void onAccept(Transport transport) {
-					try {
-						synchronized (serverMutex) {
-							ReplicationSession session = new ReplicationSession(transport);
-							session.start();
-							sessions.add(session);
-						}
-					} catch (Exception e) {
-						LOG.info("Could not accept replication connection from slave at " + transport.getRemoteAddress() + ", due to: " + e, e);
-					}
-				}
-
-				public void onAcceptError(Exception e) {
-					LOG.info("Could not accept replication connection: " + e, e);
-				}
-			});
-			server.start();
-		}
-	}
-
-	public void stop() throws Exception {
-		synchronized (serverMutex) {
-			if (server != null) {
-				server.stop();
-				server = null;
-			}
-		}
-	}
-
-	public void onClusterChange(ClusterState config) {
-		// TODO: if a slave is removed from the cluster, we should
-		// remove it's replication tracking info.
-	}
-
-	class ReplicationSession implements Service, TransportListener {
-
-		private final Transport transport;
-		private final AtomicBoolean subscribedToJournalUpdates = new AtomicBoolean();
-
-		public ReplicationSession(Transport transport) {
-			this.transport = transport;
-		}
-
-		public void start() throws Exception {
-			transport.setTransportListener(this);
-			transport.start();
-		}
-
-		public void stop() throws Exception {
-			transport.stop();
-		}
-
-		public void onCommand(Object command) {
-			try {
-				ReplicationFrame frame = (ReplicationFrame) command;
-				switch (frame.getHeader().getType()) {
-				case SLAVE_INIT:
-					subscribedToJournalUpdates.set(true);
-					onSlaveInit(frame, (PBSlaveInit) frame.getPayload());
-					break;
-				case FILE_TRANSFER:
-					onFileTransfer(frame, (PBFileInfo) frame.getPayload());
-					break;
-				case JOURNAL_UPDATE_ACK:
-					onJournalUpdateAck(frame, (PBJournalLocation) frame.getPayload());
-					break;
-				}
-			} catch (Exception e) {
-				failed(e);
-			}
-		}
-
-		public void onException(IOException error) {
-			failed(error);
-		}
-
-		public void failed(Exception error) {
-			try {
-				stop();
-			} catch (Exception ignore) {
-			}
-		}
-
-		public void transportInterupted() {
-		}
-		public void transportResumed() {
-		}
-		
-		private void onSlaveInit(ReplicationFrame frame, PBSlaveInit slaveInit) throws Exception {
-
-			// We could look at the slave state sent in the slaveInit and decide
-			// that a full sync is not needed..
-			// but for now we will do a full sync every time.
-			ReplicationFrame rc = new ReplicationFrame();
-			final PBSlaveInitResponse rcPayload = new PBSlaveInitResponse();
-			rc.setHeader(new PBHeader().setType(PBType.SLAVE_INIT_RESPONSE));
-			rc.setPayload(rcPayload);
-			
-			final KahaDBStore store = replicationServer.getStore();
-			store.checkpoint(new Callback() {
-				public void execute() throws Exception {
-					// This call back is executed once the checkpoint is
-					// completed and all data has been
-					// synced to disk, but while a lock is still held on the
-					// store so that no
-					// updates are allowed.
-
-					ArrayList<PBFileInfo> infos = new ArrayList<PBFileInfo>();
-					SnapshotStatus snapshot = createSnapshot();
-					PBFileInfo databaseInfo = new PBFileInfo();
-					databaseInfo.setName("database");
-					databaseInfo.setSnapshotId(snapshot.id);
-					databaseInfo.setStart(0);
-					databaseInfo.setEnd(snapshot.size);
-					databaseInfo.setChecksum(snapshot.checksum);
-					infos.add(databaseInfo);
-
-					Map<Integer, DataFile> journalFiles = store.getJournal().getFileMap();
-					for (DataFile df : journalFiles.values()) {
-						infos.add(createInfo("journal/" + df.getDataFileId(), df.getFile(), df.getLength()));
-					}
-					rcPayload.setCopyFilesList(infos);
-				}
-			});
-			
-			transport.oneway(rc);
-		}
-
-		private void onFileTransfer(ReplicationFrame frame, PBFileInfo fileInfo) throws IOException {
-			File file = replicationServer.getReplicationFile(fileInfo.getName());
-			long payloadSize = fileInfo.getEnd()-fileInfo.getStart();
-			
-			if( file.length() < fileInfo.getStart()+payloadSize ) {
-				throw new IOException("Requested replication file dose not have enough data.");
-			}		
-			
-			ReplicationFrame rc = new ReplicationFrame();
-			rc.setHeader(new PBHeader().setType(PBType.FILE_TRANSFER_RESPONSE).setPayloadSize(payloadSize));
-			
-			FileInputStream is = new FileInputStream(file);
-			rc.setPayload(is);
-			try {
-				is.skip(fileInfo.getStart());
-				transport.oneway(rc);
-			} finally {
-				try {
-					is.close();
-				} catch (Throwable e) {
-				}
-			}
-		}
-
-	}
-
-	static class SlaveStatus {
-		String salve_id;
-		PBJournalLocation lastAck;
-		Integer syncingSnapshot;
-	}
-
-	static class SnapshotStatus {
-		int id;
-		File file;
-		long checksum;
-		PBJournalLocation lastJournalLocation;
-		long size;
-	}
-
-
-
-	int nextSnapshotId;
-	SnapshotStatus currentSnapshot;
-	private SnapshotStatus createSnapshot() throws IOException {
-		if (currentSnapshot == null) {
-			currentSnapshot = new SnapshotStatus();
-			currentSnapshot.id = nextSnapshotId++;
-			KahaDBStore store = replicationServer.getStore();
-			File file = store.getPageFile().getFile();
-			currentSnapshot.file = new File(file.getParentFile(), "snapshot-" + currentSnapshot.id);
-			currentSnapshot.checksum = copyAndChecksum(file, currentSnapshot.file);
-			currentSnapshot.lastJournalLocation = convert(store.getJournal().getLastAppendLocation());
-			currentSnapshot.size = currentSnapshot.file.length();
-		}
-		return currentSnapshot;
-	}
-
-	private PBJournalLocation convert(Location loc) {
-		return new PBJournalLocation().setFileId(loc.getDataFileId()).setOffset(loc.getOffset());
-	}
-
-	private long copyAndChecksum(File input, File output) throws IOException {
-		FileInputStream is = null;
-		FileOutputStream os = null;
-		try {
-			is = new FileInputStream(input);
-			os = new FileOutputStream(output);
-
-			byte buffer[] = new byte[1024 * 4];
-			int c;
-
-			Checksum checksum = new Adler32();
-			while ((c = is.read(buffer)) >= 0) {
-				os.write(buffer, 0, c);
-				checksum.update(buffer, 0, c);
-			}
-			return checksum.getValue();
-
-		} finally {
-			try {
-				is.close();
-			} finally {
-			}
-			try {
-				os.close();
-			} finally {
-			}
-		}
-	}
-
-	private PBFileInfo createInfo(String name, File file, int length) throws IOException {
-		PBFileInfo rc = new PBFileInfo();
-		rc.setName(name);
-		FileInputStream is = new FileInputStream(file);
-		byte buffer[] = new byte[1024 * 4];
-		int c;
-
-		long size = 0;
-		Checksum checksum = new Adler32();
-		while (size < length && (c = is.read(buffer, 0, (int) Math.min(length - size, buffer.length))) >= 0) {
-			checksum.update(buffer, 0, c);
-			size += c;
-		}
-		rc.setChecksum(checksum.getValue());
-		rc.setStart(0);
-		rc.setEnd(size);
-		return rc;
-	}
-
-	private void onJournalUpdateAck(ReplicationFrame frame, PBJournalLocation journalLocation) {
-	}
-}
+/**
+ * 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.kahadb.replication;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.zip.Adler32;
+import java.util.zip.Checksum;
+
+import org.apache.activemq.Service;
+import org.apache.activemq.transport.Transport;
+import org.apache.activemq.transport.TransportAcceptListener;
+import org.apache.activemq.transport.TransportFactory;
+import org.apache.activemq.transport.TransportListener;
+import org.apache.activemq.transport.TransportServer;
+import org.apache.activemq.util.Callback;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.kahadb.journal.DataFile;
+import org.apache.kahadb.journal.Location;
+import org.apache.kahadb.replication.pb.PBFileInfo;
+import org.apache.kahadb.replication.pb.PBHeader;
+import org.apache.kahadb.replication.pb.PBJournalLocation;
+import org.apache.kahadb.replication.pb.PBSlaveInit;
+import org.apache.kahadb.replication.pb.PBSlaveInitResponse;
+import org.apache.kahadb.replication.pb.PBType;
+import org.apache.kahadb.store.KahaDBStore;
+
+public class ReplicationMaster implements Service, ClusterListener {
+
+	private static final Log LOG = LogFactory.getLog(ReplicationServer.class);
+
+	private final ReplicationServer replicationServer;
+
+	private Object serverMutex = new Object() {
+	};
+	private TransportServer server;
+	private ArrayList<ReplicationSession> sessions = new ArrayList<ReplicationSession>();
+
+	public ReplicationMaster(ReplicationServer replication1Server) {
+		this.replicationServer = replication1Server;
+	}
+
+	public void start() throws Exception {
+		synchronized (serverMutex) {
+			server = TransportFactory.bind(new URI(replicationServer.getNodeId()));
+			server.setAcceptListener(new TransportAcceptListener() {
+				public void onAccept(Transport transport) {
+					try {
+						synchronized (serverMutex) {
+							ReplicationSession session = new ReplicationSession(transport);
+							session.start();
+							sessions.add(session);
+						}
+					} catch (Exception e) {
+						LOG.info("Could not accept replication connection from slave at " + transport.getRemoteAddress() + ", due to: " + e, e);
+					}
+				}
+
+				public void onAcceptError(Exception e) {
+					LOG.info("Could not accept replication connection: " + e, e);
+				}
+			});
+			server.start();
+		}
+	}
+
+	public void stop() throws Exception {
+		synchronized (serverMutex) {
+			if (server != null) {
+				server.stop();
+				server = null;
+			}
+		}
+	}
+
+	public void onClusterChange(ClusterState config) {
+		// TODO: if a slave is removed from the cluster, we should
+		// remove it's replication tracking info.
+	}
+
+	class ReplicationSession implements Service, TransportListener {
+
+		private final Transport transport;
+		private final AtomicBoolean subscribedToJournalUpdates = new AtomicBoolean();
+
+		public ReplicationSession(Transport transport) {
+			this.transport = transport;
+		}
+
+		public void start() throws Exception {
+			transport.setTransportListener(this);
+			transport.start();
+		}
+
+		public void stop() throws Exception {
+			transport.stop();
+		}
+
+		public void onCommand(Object command) {
+			try {
+				ReplicationFrame frame = (ReplicationFrame) command;
+				switch (frame.getHeader().getType()) {
+				case SLAVE_INIT:
+					subscribedToJournalUpdates.set(true);
+					onSlaveInit(frame, (PBSlaveInit) frame.getPayload());
+					break;
+				case FILE_TRANSFER:
+					onFileTransfer(frame, (PBFileInfo) frame.getPayload());
+					break;
+				case JOURNAL_UPDATE_ACK:
+					onJournalUpdateAck(frame, (PBJournalLocation) frame.getPayload());
+					break;
+				}
+			} catch (Exception e) {
+				failed(e);
+			}
+		}
+
+		public void onException(IOException error) {
+			failed(error);
+		}
+
+		public void failed(Exception error) {
+			try {
+				stop();
+			} catch (Exception ignore) {
+			}
+		}
+
+		public void transportInterupted() {
+		}
+		public void transportResumed() {
+		}
+		
+		private void onSlaveInit(ReplicationFrame frame, PBSlaveInit slaveInit) throws Exception {
+
+			// We could look at the slave state sent in the slaveInit and decide
+			// that a full sync is not needed..
+			// but for now we will do a full sync every time.
+			ReplicationFrame rc = new ReplicationFrame();
+			final PBSlaveInitResponse rcPayload = new PBSlaveInitResponse();
+			rc.setHeader(new PBHeader().setType(PBType.SLAVE_INIT_RESPONSE));
+			rc.setPayload(rcPayload);
+			
+			final KahaDBStore store = replicationServer.getStore();
+			store.checkpoint(new Callback() {
+				public void execute() throws Exception {
+					// This call back is executed once the checkpoint is
+					// completed and all data has been
+					// synced to disk, but while a lock is still held on the
+					// store so that no
+					// updates are allowed.
+
+					ArrayList<PBFileInfo> infos = new ArrayList<PBFileInfo>();
+					SnapshotStatus snapshot = createSnapshot();
+					PBFileInfo databaseInfo = new PBFileInfo();
+					databaseInfo.setName("database");
+					databaseInfo.setSnapshotId(snapshot.id);
+					databaseInfo.setStart(0);
+					databaseInfo.setEnd(snapshot.size);
+					databaseInfo.setChecksum(snapshot.checksum);
+					infos.add(databaseInfo);
+
+					Map<Integer, DataFile> journalFiles = store.getJournal().getFileMap();
+					for (DataFile df : journalFiles.values()) {
+						infos.add(createInfo("journal/" + df.getDataFileId(), df.getFile(), df.getLength()));
+					}
+					rcPayload.setCopyFilesList(infos);
+				}
+			});
+			
+			transport.oneway(rc);
+		}
+
+		private void onFileTransfer(ReplicationFrame frame, PBFileInfo fileInfo) throws IOException {
+			File file = replicationServer.getReplicationFile(fileInfo.getName());
+			long payloadSize = fileInfo.getEnd()-fileInfo.getStart();
+			
+			if( file.length() < fileInfo.getStart()+payloadSize ) {
+				throw new IOException("Requested replication file dose not have enough data.");
+			}		
+			
+			ReplicationFrame rc = new ReplicationFrame();
+			rc.setHeader(new PBHeader().setType(PBType.FILE_TRANSFER_RESPONSE).setPayloadSize(payloadSize));
+			
+			FileInputStream is = new FileInputStream(file);
+			rc.setPayload(is);
+			try {
+				is.skip(fileInfo.getStart());
+				transport.oneway(rc);
+			} finally {
+				try {
+					is.close();
+				} catch (Throwable e) {
+				}
+			}
+		}
+
+	}
+
+	static class SlaveStatus {
+		String salve_id;
+		PBJournalLocation lastAck;
+		Integer syncingSnapshot;
+	}
+
+	static class SnapshotStatus {
+		int id;
+		File file;
+		long checksum;
+		PBJournalLocation lastJournalLocation;
+		long size;
+	}
+
+
+
+	int nextSnapshotId;
+	SnapshotStatus currentSnapshot;
+	private SnapshotStatus createSnapshot() throws IOException {
+		if (currentSnapshot == null) {
+			currentSnapshot = new SnapshotStatus();
+			currentSnapshot.id = nextSnapshotId++;
+			KahaDBStore store = replicationServer.getStore();
+			File file = store.getPageFile().getFile();
+			currentSnapshot.file = new File(file.getParentFile(), "snapshot-" + currentSnapshot.id);
+			currentSnapshot.checksum = copyAndChecksum(file, currentSnapshot.file);
+			currentSnapshot.lastJournalLocation = convert(store.getJournal().getLastAppendLocation());
+			currentSnapshot.size = currentSnapshot.file.length();
+		}
+		return currentSnapshot;
+	}
+
+	private PBJournalLocation convert(Location loc) {
+		return new PBJournalLocation().setFileId(loc.getDataFileId()).setOffset(loc.getOffset());
+	}
+
+	private long copyAndChecksum(File input, File output) throws IOException {
+		FileInputStream is = null;
+		FileOutputStream os = null;
+		try {
+			is = new FileInputStream(input);
+			os = new FileOutputStream(output);
+
+			byte buffer[] = new byte[1024 * 4];
+			int c;
+
+			Checksum checksum = new Adler32();
+			while ((c = is.read(buffer)) >= 0) {
+				os.write(buffer, 0, c);
+				checksum.update(buffer, 0, c);
+			}
+			return checksum.getValue();
+
+		} finally {
+			try {
+				is.close();
+			} finally {
+			}
+			try {
+				os.close();
+			} finally {
+			}
+		}
+	}
+
+	private PBFileInfo createInfo(String name, File file, int length) throws IOException {
+		PBFileInfo rc = new PBFileInfo();
+		rc.setName(name);
+		FileInputStream is = new FileInputStream(file);
+		byte buffer[] = new byte[1024 * 4];
+		int c;
+
+		long size = 0;
+		Checksum checksum = new Adler32();
+		while (size < length && (c = is.read(buffer, 0, (int) Math.min(length - size, buffer.length))) >= 0) {
+			checksum.update(buffer, 0, c);
+			size += c;
+		}
+		rc.setChecksum(checksum.getValue());
+		rc.setStart(0);
+		rc.setEnd(size);
+		return rc;
+	}
+
+	private void onJournalUpdateAck(ReplicationFrame frame, PBJournalLocation journalLocation) {
+	}
+}

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationMaster.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationServer.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationServer.java?rev=712224&r1=712223&r2=712224&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationServer.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/replication/ReplicationServer.java Fri Nov  7 11:00:25 2008
@@ -1,188 +1,188 @@
-/**
- * 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.kahadb.replication;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activemq.Service;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.kahadb.page.PageFile;
-import org.apache.kahadb.store.KahaDBStore;
-
-/**
- * Handles interfacing with the ClusterStateManager and handles activating the slave or master facets of
- * the broker.
- * 
- * @author chirino
- */
-public class ReplicationServer implements Service, ClusterListener {
-
-    private static final Log LOG = LogFactory.getLog(ReplicationServer.class);
-
-    private KahaDBStore store;
-
-	private ReplicatedBrokerService brokerService;
-
-	public ReplicationServer() {
-	}
-
-	public ReplicatedBrokerService getBrokerService() {
-		return brokerService;
-	}
-
-	public void setBrokerService(ReplicatedBrokerService brokerService) {
-		this.brokerService = brokerService;
-	}
-
-	public KahaDBStore getStore() {
-		return store;
-	}
-	public void setStore(KahaDBStore store) {
-		this.store = store;
-	}
-
-	public String getNodeId() {
-		return nodeId;
-	}
-
-	public void setNodeId(String nodeId) {
-		this.nodeId = nodeId;
-	}
-
-	public ClusterStateManager getCluster() {
-		return cluster;
-	}
-
-	public void setCluster(ClusterStateManager cluster) {
-		this.cluster = cluster;
-	}
-
-	PageFile pageFile;
-	String nodeId;
-	ClusterStateManager cluster;
-
-	ReplicationMaster master;
-	ReplicationSlave slave;
-
-	private ClusterState clusterState;
-
-	public void start() throws Exception {
-		// The cluster will let us know about the cluster configuration,
-		// which lets us decide if we are going to be a slave or a master.
-		cluster.addListener(this);
-		cluster.start();
-	}
-
-	public void stop() throws Exception {
-		cluster.removeListener(this);
-		cluster.stop();
-	}
-
-	public void onClusterChange(ClusterState clusterState) {
-		this.clusterState = clusterState;
-		try {
-			synchronized (cluster) {
-				if (areWeTheSlave(clusterState)) {
-					// If we were the master we need to stop the master service..
-					if (master != null) {
-						LOG.info("Shutting down master due to cluster state change.");
-						master.stop();
-						master = null;
-						// TODO: broker service does not support getting restarted once it's been stopped. :(
-						// so at this point we need, to re-create the broker if we want to go back into slave 
-						// mode.
-						brokerService.stopMaster();
-					}
-					// If the slave service was not yet started.. start it up.
-					if (slave == null) {
-						LOG.info("Starting replication slave.");
-						slave = new ReplicationSlave(this);
-						slave.start();
-					}
-					slave.onClusterChange(clusterState);
-				} else if (areWeTheMaster(clusterState)) {
-					// If we were the slave we need to stop the slave service..
-					if (slave != null) {
-						LOG.info("Switching from Slave to Master.");
-						slave.stop();
-						slave = null;
-					}
-					// If the master service was not yet started.. start it up.
-					if (master == null) {
-						LOG.info("Starting Master.");
-						master = new ReplicationMaster(this);
-						master.start();
-						brokerService.startMaster();
-					}
-					
-					master.onClusterChange(clusterState);					
-				} else {
-					// We were not part of the configuration (not master nor slave).
-					// So we have to shutdown any running master or slave services that may
-					// have been running.
-					if (master != null) {
-						LOG.info("Stoping master.. we were removed from the HA cluster.");
-						master.stop();
-						master = null;
-					}
-					if (slave != null) {
-						LOG.info("Stoping slave.. we were removed from the HA cluster.");
-						slave.stop();
-						slave = null;
-					}					
-				}
-			}
-		} catch (Exception e) {
-			LOG.warn("Unexpected Error: "+e, e);
-		}
-	}
-
-	public ClusterState getClusterState() {
-		return clusterState;
-	}
-
-	private boolean areWeTheSlave(ClusterState config) {
-		return config.getSlaves().contains(nodeId);
-	}
-	
-	private boolean areWeTheMaster(ClusterState config) {
-		return nodeId.equals(config.getMaster());
-	}
-
-	public File getReplicationFile(String fn) throws IOException {
-		if (fn.equals("database")) {
-			return getStore().getPageFile().getFile();
-		} if (fn.startsWith("journal/")) {
-			int id;
-			try {
-				id = Integer.parseInt(fn.substring("journal/".length()));
-			} catch (NumberFormatException e) {
-				throw new IOException("Unknown replication file name: "+fn);
-			}
-			return getStore().getJournal().getFile(id);
-		} else {
-			throw new IOException("Unknown replication file name: "+fn);
-		}
-	}
-
-	public boolean isMaster() {
-		return master!=null;
-	}
-
-}
+/**
+ * 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.kahadb.replication;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.activemq.Service;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.kahadb.page.PageFile;
+import org.apache.kahadb.store.KahaDBStore;
+
+/**
+ * Handles interfacing with the ClusterStateManager and handles activating the slave or master facets of
+ * the broker.
+ * 
+ * @author chirino
+ */
+public class ReplicationServer implements Service, ClusterListener {
+
+    private static final Log LOG = LogFactory.getLog(ReplicationServer.class);
+
+    private KahaDBStore store;
+
+	private ReplicatedBrokerService brokerService;
+
+	public ReplicationServer() {
+	}
+
+	public ReplicatedBrokerService getBrokerService() {
+		return brokerService;
+	}
+
+	public void setBrokerService(ReplicatedBrokerService brokerService) {
+		this.brokerService = brokerService;
+	}
+
+	public KahaDBStore getStore() {
+		return store;
+	}
+	public void setStore(KahaDBStore store) {
+		this.store = store;
+	}
+
+	public String getNodeId() {
+		return nodeId;
+	}
+
+	public void setNodeId(String nodeId) {
+		this.nodeId = nodeId;
+	}
+
+	public ClusterStateManager getCluster() {
+		return cluster;
+	}
+
+	public void setCluster(ClusterStateManager cluster) {
+		this.cluster = cluster;
+	}
+
+	PageFile pageFile;
+	String nodeId;
+	ClusterStateManager cluster;
+
+	ReplicationMaster master;
+	ReplicationSlave slave;
+
+	private ClusterState clusterState;
+
+	public void start() throws Exception {
+		// The cluster will let us know about the cluster configuration,
+		// which lets us decide if we are going to be a slave or a master.
+		cluster.addListener(this);
+		cluster.start();
+	}
+
+	public void stop() throws Exception {
+		cluster.removeListener(this);
+		cluster.stop();
+	}
+
+	public void onClusterChange(ClusterState clusterState) {
+		this.clusterState = clusterState;
+		try {
+			synchronized (cluster) {
+				if (areWeTheSlave(clusterState)) {
+					// If we were the master we need to stop the master service..
+					if (master != null) {
+						LOG.info("Shutting down master due to cluster state change.");
+						master.stop();
+						master = null;
+						// TODO: broker service does not support getting restarted once it's been stopped. :(
+						// so at this point we need, to re-create the broker if we want to go back into slave 
+						// mode.
+						brokerService.stopMaster();
+					}
+					// If the slave service was not yet started.. start it up.
+					if (slave == null) {
+						LOG.info("Starting replication slave.");
+						slave = new ReplicationSlave(this);
+						slave.start();
+					}
+					slave.onClusterChange(clusterState);
+				} else if (areWeTheMaster(clusterState)) {
+					// If we were the slave we need to stop the slave service..
+					if (slave != null) {
+						LOG.info("Switching from Slave to Master.");
+						slave.stop();
+						slave = null;
+					}
+					// If the master service was not yet started.. start it up.
+					if (master == null) {
+						LOG.info("Starting Master.");
+						master = new ReplicationMaster(this);
+						master.start();
+						brokerService.startMaster();
+					}
+					
+					master.onClusterChange(clusterState);					
+				} else {
+					// We were not part of the configuration (not master nor slave).
+					// So we have to shutdown any running master or slave services that may
+					// have been running.
+					if (master != null) {
+						LOG.info("Stoping master.. we were removed from the HA cluster.");
+						master.stop();
+						master = null;
+					}
+					if (slave != null) {
+						LOG.info("Stoping slave.. we were removed from the HA cluster.");
+						slave.stop();
+						slave = null;
+					}					
+				}
+			}
+		} catch (Exception e) {
+			LOG.warn("Unexpected Error: "+e, e);
+		}
+	}
+
+	public ClusterState getClusterState() {
+		return clusterState;
+	}
+
+	private boolean areWeTheSlave(ClusterState config) {
+		return config.getSlaves().contains(nodeId);
+	}
+	
+	private boolean areWeTheMaster(ClusterState config) {
+		return nodeId.equals(config.getMaster());
+	}
+
+	public File getReplicationFile(String fn) throws IOException {
+		if (fn.equals("database")) {
+			return getStore().getPageFile().getFile();
+		} if (fn.startsWith("journal/")) {
+			int id;
+			try {
+				id = Integer.parseInt(fn.substring("journal/".length()));
+			} catch (NumberFormatException e) {
+				throw new IOException("Unknown replication file name: "+fn);
+			}
+			return getStore().getJournal().getFile(id);
+		} else {
+			throw new IOException("Unknown replication file name: "+fn);
+		}
+	}
+
+	public boolean isMaster() {
+		return master!=null;
+	}
+
+}



Mime
View raw message