Doc fixes and mark ChronicleHashBuilder.create* methods which accept ChronicleHashCorruption.Listener as Beta

This commit is contained in:
leventov
2017-06-04 11:52:30 -05:00
parent ed8361b5cf
commit 88da33fc10
3 changed files with 15 additions and 4 deletions
@@ -624,6 +624,7 @@ public interface ChronicleHashBuilder<K, H extends ChronicleHash<K, ?, ?, ?>,
* @see #createOrRecoverPersistedTo(File, boolean)
* @see #recoverPersistedTo(File, boolean)
*/
@Beta
H createOrRecoverPersistedTo(
File file, boolean sameLibraryVersion,
ChronicleHashCorruption.Listener corruptionListener) throws IOException;
@@ -739,6 +740,7 @@ public interface ChronicleHashBuilder<K, H extends ChronicleHash<K, ?, ?, ?>,
* @see #createOrRecoverPersistedTo(File, boolean, ChronicleHashCorruption.Listener)
* @see #createPersistedTo(File)
*/
@Beta
H recoverPersistedTo(
File file, boolean sameBuilderConfigAndLibraryVersion,
ChronicleHashCorruption.Listener corruptionListener) throws IOException;
@@ -38,9 +38,13 @@ import java.io.File;
* used outside of the {@link Listener#onCorruption(ChronicleHashCorruption)} method body, because
* {@code ChronicleHashCorruption} objects could be reused during the recovery procedure.
*
* <p>During a recovery procedure, <i>{@link Listener#onCorruption(ChronicleHashCorruption)} might
* be called concurrently from multiple threads.</i> If the implementation of this method calls some
* methods on some objects, that are not safe for concurrent use from multiple threads, the
* implementation must care about synchronization itself.
*
* @see ChronicleHashBuilder#recoverPersistedTo(File, boolean, Listener)
* @see ChronicleHashBuilder#createOrRecoverPersistedTo(File, boolean, Listener)
* @see ChronicleHashBuilder#recoverPersistedTo(File, boolean, ChronicleHashCorruption.Listener)
* @see ChronicleHashBuilder#createOrRecoverPersistedTo(File, boolean, ChronicleHashCorruption.Listener)
*/
@Beta
public interface ChronicleHashCorruption {
@@ -73,9 +77,14 @@ public interface ChronicleHashCorruption {
@Beta
interface Listener {
/**
* Called, when <a href="https://github.com/OpenHFT/Chronicle-Map#recovery">recovery</a>
* Called when <a href="https://github.com/OpenHFT/Chronicle-Map#recovery">recovery</a>
* procedure encounters a corruption of a persisted Chronicle Map.
*
* <p>During a recovery procedure, <i>this method might be called concurrently from multiple
* threads.</i> If the implementation of this method calls some methods on some objects,
* that are not safe for concurrent use from multiple threads, the implementation must
* care about synchronization itself.
*
* @param corruption the corruption object, must not be saved and used outside the body of
* the {@code #onCorruption()} method, because during the recovery
* procedure, the same corruption object could be reused.
@@ -53,7 +53,7 @@ public interface SizedReader<T> extends Marshallable {
* given {@code using} object, i. e. to read the deserialized data into the given object. If it
* is possible, this objects then returned from this method. If it is impossible for any reason,
* a new object should be created and returned. The given {@code using} object could be {@code
* null}, in this case this method, of cause, should create a new object.
* null}, in this case read() should always create a new object.
*
* <p>This method should increment the position in the given {@code Bytes} by the given {@code
* size}.