From 03f3f58b91063a52e48035067ff08d6f034dc897 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Mon, 1 Dec 2014 12:10:42 +0000 Subject: [PATCH] imporved javadoc --- .../openhft/chronicle/hash/ChronicleHashBuilder.java | 6 +++--- .../java/net/openhft/chronicle/hash/FindByName.java | 8 +++++--- .../hash/replication/TcpTransportAndNetworkConfig.java | 10 +++++++--- .../net/openhft/chronicle/set/ChronicleSetBuilder.java | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java b/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java index 8cec3130c..7a12a592d 100755 --- a/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java +++ b/src/main/java/net/openhft/chronicle/hash/ChronicleHashBuilder.java @@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit; /** * This interface defines the meaning of configurations, common to {@link - * net.openhft.chronicle.map.OnHeapUpdatableChronicleMapBuilder} and {@link ChronicleSetBuilder}, i. + * net.openhft.chronicle.map.ChronicleMapBuilder} and {@link ChronicleSetBuilder}, i. * e. Chronicle hash container configurations. * *

{@code ChronicleHashBuilder} is mutable. Configuration methods mutate the builder and return @@ -131,7 +131,7 @@ public interface ChronicleHashBuilderThere are three major patterns of this configuration usage:

  1. Key (and value, in * {@code ChronicleMap} case) sizes are constant. Configure them via {@link - * #constantKeySizeBySample(Object)} and {@link net.openhft.chronicle.map.OnHeapUpdatableChronicleMapBuilder#constantValueSizeBySample(Object)} + * #constantKeySizeBySample(Object)} and {@link net.openhft.chronicle.map.ChronicleMapBuilder#constantValueSizeBySample(Object)} * methods, and you will experience no memory waste at all.
  2. Key (and/or value size, in * {@code ChronicleMap} case) varies moderately. Specify them using corresponding methods, or * specify entry size directly by calling this method, by sizes somewhere between average and @@ -184,7 +184,7 @@ public interface ChronicleHashBuilder
  3. If key (and/or value, in {@code ChronicleMap} case) size varies * moderately, you should pass to this method the maximum number of entries + 5-25%, depending * on your data properties and configured {@linkplain #keySize(int) key}/{@linkplain - * net.openhft.chronicle.map.OnHeapUpdatableChronicleMapBuilder#valueSize(int) + * net.openhft.chronicle.map.ChronicleMapBuilder#valueSize(int) * value}/{@linkplain #entrySize(int) entry} sizes.
  4. If your data size varies in a wide * range, pass the maximum number of entries multiplied by average data size and divided by the * configured "entry size" (i. e. chunk size). See an example in the documentation to {@link diff --git a/src/main/java/net/openhft/chronicle/hash/FindByName.java b/src/main/java/net/openhft/chronicle/hash/FindByName.java index dcfc27564..7f5ffbf3f 100644 --- a/src/main/java/net/openhft/chronicle/hash/FindByName.java +++ b/src/main/java/net/openhft/chronicle/hash/FindByName.java @@ -10,10 +10,12 @@ public interface FindByName { /** * @param name the name of the map or set - * @param + * @param the type returned * @return a chronicle map or set - * @throws IllegalArgumentException if a map with this name can not be found - * @throws IOException if it not possible to create the map or set + * @throws IllegalArgumentException if a map with this name can not be found + * @throws IOException if it not possible to create the map or set + * @throws java.util.concurrent.TimeoutException if the call times out + * @throws java.util.concurrent.TimeoutException if interrupted by another thread */ T from(String name) throws IllegalArgumentException, IOException, TimeoutException, InterruptedException; diff --git a/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java b/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java index ccd51fb49..f75804f6d 100644 --- a/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java +++ b/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java @@ -135,7 +135,9 @@ public final class TcpTransportAndNetworkConfig implements Serializable { } /** - * @param name the name used here is reflected in the Tcp Replicator and is typically used when debugging + * @param name the name used here is reflected in the Tcp Replicator and is typically used when + * debugging + * @return self */ public TcpTransportAndNetworkConfig name(String name) { this.name = name; @@ -164,11 +166,13 @@ public final class TcpTransportAndNetworkConfig implements Serializable { TcpTransportAndNetworkConfig that = (TcpTransportAndNetworkConfig) o; - if (autoReconnectedUponDroppedConnection != that.autoReconnectedUponDroppedConnection) return false; + if (autoReconnectedUponDroppedConnection != that.autoReconnectedUponDroppedConnection) + return false; if (heartBeatInterval != that.heartBeatInterval) return false; if (packetSize != that.packetSize) return false; if (serverPort != that.serverPort) return false; - if (endpoints != null ? !endpoints.equals(that.endpoints) : that.endpoints != null) return false; + if (endpoints != null ? !endpoints.equals(that.endpoints) : that.endpoints != null) + return false; if (heartBeatIntervalUnit != that.heartBeatIntervalUnit) return false; if (throttlingConfig != null ? !throttlingConfig.equals(that.throttlingConfig) : that.throttlingConfig != null) return false; diff --git a/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java b/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java index 7430fe1c9..d669d3bec 100755 --- a/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java +++ b/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java @@ -45,12 +45,12 @@ import java.util.concurrent.TimeUnit; * {@code ChronicleSetBuilder} manages the whole set of {@link ChronicleSet} configurations, could * be used as a classic builder and/or factory. * - *

    {@code ChronicleMapOnHeapUpdatableBuilder} is mutable, see a note in {@link + *

    {@code ChronicleMapBuilder} is mutable, see a note in {@link * ChronicleHashBuilder} interface documentation. * * @param element type of the sets, created by this builder * @see ChronicleSet - * @see net.openhft.chronicle.map.OnHeapUpdatableChronicleMapBuilder + * @see net.openhft.chronicle.map.ChronicleMapBuilder */ public class ChronicleSetBuilder implements ChronicleHashBuilder, ChronicleSetBuilder> {