zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject svn commit: r1365870 - in /zookeeper/bookkeeper/trunk: CHANGES.txt bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java
Date Thu, 26 Jul 2012 03:00:27 GMT
Author: sijie
Date: Thu Jul 26 03:00:27 2012
New Revision: 1365870

URL: http://svn.apache.org/viewvc?rev=1365870&view=rev
Log:
BOOKKEEPER-317: Exceptions for replication (ivank via sijie)

Added:
    zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/
    zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java
  (with props)
Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1365870&r1=1365869&r2=1365870&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Thu Jul 26 03:00:27 2012
@@ -60,6 +60,8 @@ Trunk (unreleased changes)
 
         BOOKKEEPER-2: bookkeeper does not put enough meta-data in to do recovery properly
(ivank via sijie)
 
+        BOOKKEEPER-317: Exceptions for replication (ivank via sijie)
+
       hedwig-server:
 
         BOOKKEEPER-250: Need a ledger manager like interface to manage metadata operations
in Hedwig (sijie via ivank)

Added: zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java?rev=1365870&view=auto
==============================================================================
--- zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java
(added)
+++ zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java
Thu Jul 26 03:00:27 2012
@@ -0,0 +1,63 @@
+/**
+ * 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.bookkeeper.replication;
+
+/**
+ * Exceptions for use within the replication service
+ */
+abstract class ReplicationException extends Exception {
+    protected ReplicationException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    protected ReplicationException(String message) {
+        super(message);
+    }
+
+    /**
+     * The replication service has become unavailable
+     */
+    static class UnavailableException extends ReplicationException {
+        private static final long serialVersionUID = 31872209L;
+
+        UnavailableException(String message, Throwable cause) {
+            super(message, cause);
+        }
+
+        UnavailableException(String message) {
+            super(message);
+        }
+    }
+
+    /**
+     * Compatibility error. This version of the code, doesn't know how to
+     * deal with the metadata it has found.
+     */
+    static class CompatibilityException extends ReplicationException {
+        private static final long serialVersionUID = 98551903L;
+
+        CompatibilityException(String message, Throwable cause) {
+            super(message, cause);
+        }
+
+        CompatibilityException(String message) {
+            super(message);
+        }
+    }
+}

Propchange: zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationException.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message