-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supported callbacks on async replication ok & error. Fixed issue #5249
- Loading branch information
Showing
9 changed files
with
462 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
core/src/main/java/com/orientechnologies/orient/core/replication/OAsyncReplicationError.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* | ||
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) | ||
* * | ||
* * Licensed 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. | ||
* * | ||
* * For more information: http://www.orientechnologies.com | ||
* | ||
*/ | ||
package com.orientechnologies.orient.core.replication; | ||
|
||
/** | ||
* Interface to catch errors on asynchronous replication. | ||
* | ||
* @author Luca Garulli | ||
*/ | ||
public interface OAsyncReplicationError { | ||
enum ACTION {IGNORE, RETRY} | ||
|
||
/** | ||
* Callback called in case of error during asynchronous replication. | ||
* | ||
* @param iException The exception caught | ||
* @param iRetry The number of retries so far. At every retry, this number is incremented. | ||
* @return RETRY to retry the operation, otherwise IGNORE | ||
*/ | ||
ACTION onAsyncReplicationError(Throwable iException, int iRetry); | ||
} |
29 changes: 29 additions & 0 deletions
29
core/src/main/java/com/orientechnologies/orient/core/replication/OAsyncReplicationOk.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* | ||
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) | ||
* * | ||
* * Licensed 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. | ||
* * | ||
* * For more information: http://www.orientechnologies.com | ||
* | ||
*/ | ||
package com.orientechnologies.orient.core.replication; | ||
|
||
/** | ||
* Interface to catch asynchronous replication operation successfully completed. | ||
* | ||
* @author Luca Garulli | ||
*/ | ||
public interface OAsyncReplicationOk { | ||
void onAsyncReplicationOk(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.