From 9ef7c514a3a18ddeb6310be1f43a22e4a111c048 Mon Sep 17 00:00:00 2001 From: leventov Date: Fri, 2 Oct 2015 05:49:56 +0300 Subject: [PATCH] Link ReplicableEntry and ChronicleHashBuilder.cleanupRemovedEntries() in Javadoc --- .../net/openhft/chronicle/hash/ChronicleHashBuilder.java | 7 ++++++- .../chronicle/hash/replication/ReplicableEntry.java | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java b/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java index 1c42a3f6d..de9703502 100755 --- a/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java +++ b/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java @@ -16,6 +16,7 @@ package net.openhft.chronicle.hash; +import net.openhft.chronicle.hash.replication.ReplicableEntry; import net.openhft.chronicle.hash.replication.SingleChronicleHashReplication; import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig; import net.openhft.chronicle.hash.replication.TimeProvider; @@ -405,7 +406,7 @@ public interface ChronicleHashBuilder, * is not immediately erased from the data structure, to let the distributed system eventually * converge on some value for this key (or converge on the fact, that this key is removed). * Chronicle Hash watch in runtime after the entries, and if one is removed and not updated - * in anyway for this {@code removedEntryCleanupTimeout}, Chronicle is allowed to remove this + * in any way for this {@code removedEntryCleanupTimeout}, Chronicle is allowed to remove this * entry completely from the data structure. This timeout should depend on your distributed * system topology, and typical replication latencies, that should be determined experimentally. * @@ -416,6 +417,8 @@ public interface ChronicleHashBuilder, * @param unit time unit, in which the timeout is given * @return this builder back * @throws IllegalArgumentException is the specified timeout is less than 1 millisecond + * @see #cleanupRemovedEntries(boolean) + * @see ReplicableEntry#doRemoveCompletely() */ B removedEntryCleanupTimeout(long removedEntryCleanupTimeout, TimeUnit unit); @@ -428,6 +431,8 @@ public interface ChronicleHashBuilder, * * @param cleanupRemovedEntries if stale removed entries should be purged from Chronicle Hash * @return this builder back + * @see #removedEntryCleanupTimeout(long, TimeUnit) + * @see ReplicableEntry#doRemoveCompletely() */ B cleanupRemovedEntries(boolean cleanupRemovedEntries); diff --git a/src/main/java/net/openhft/chronicle/hash/replication/ReplicableEntry.java b/src/main/java/net/openhft/chronicle/hash/replication/ReplicableEntry.java index aab386260..dbdf94e79 100644 --- a/src/main/java/net/openhft/chronicle/hash/replication/ReplicableEntry.java +++ b/src/main/java/net/openhft/chronicle/hash/replication/ReplicableEntry.java @@ -26,9 +26,11 @@ import net.openhft.chronicle.map.Replica; import net.openhft.chronicle.map.replication.MapRemoteOperations; import net.openhft.chronicle.set.replication.SetRemoteOperations; +import java.util.concurrent.TimeUnit; + /** - * Abstracts a replicable entry in the replicated {@link ChronicleHash}. A {@link HashAbsentEntry} - * might be a {@code ReplicableEntry} as well as {@link HashEntry}. + * Abstracts a replicable entry in the replicated {@link ChronicleHash}. Both {@link HashEntry} and + * {@link HashAbsentEntry} could implement {@code ReplicableEntry} interface. */ public interface ReplicableEntry { /** @@ -104,6 +106,9 @@ public interface ReplicableEntry { * processed, as the entry have never been present in the Chronicle hash. After calling this * method any subsequent call of any method of {@code ReplicableEntry} class throws {@code * IllegalStateException}. + * + * @see ChronicleHashBuilder#cleanupRemovedEntries(boolean) + * @see ChronicleHashBuilder#removedEntryCleanupTimeout(long, TimeUnit) */ void doRemoveCompletely(); }