From d25713f47da8c417d9e315345980e3cfdad5d461 Mon Sep 17 00:00:00 2001 From: danielshaya Date: Thu, 13 Nov 2014 11:38:41 +0000 Subject: [PATCH 1/2] Fixed formatting in JavaDoc. --- .../openhft/chronicle/map/ChronicleMap.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/ChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ChronicleMap.java index f72e313e2..6949e9ea0 100644 --- a/src/main/java/net/openhft/chronicle/map/ChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ChronicleMap.java @@ -112,16 +112,14 @@ public interface ChronicleMap extends ConcurrentMap, ChronicleHash { * method, depending on what deserialization strategy is configured on the builder, using which this map * was constructed. If the value deserializer is able to reuse the given {@code usingValue} object, * calling this method instead of {@link #get(Object)} could help to reduce garbage creation. - * - *

try (ReadContext>?, BondVOInterface< context = map.getUsingLocked(key,using)) { - * BondVOInterface bond = context.value().getValue(); - * - * long issueDate = bond.getIssueDate(); String symbol = bond.getSymbol(); - * - * // add your logic here ( the lock will ensure this bond can not be changed by another thread ) - * - * } // the read lock is released here

- * + *
{@code
+     * 

try (ReadContext context = map.getUsingLocked(key,using)) { + * BondVOInterface bond = context.value().getValue(); + * long issueDate = bond.getIssueDate(); + * String symbol = bond.getSymbol(); + * // add your logic here (the lock will ensure this bond can not be changed by another thread) + * } // the read lock is released here. + * }

* To ensure that you can read the 'issueDate' and 'symbol' can be read atomically, these values must be * read while the segment lock is in place. * @@ -143,7 +141,7 @@ public interface ChronicleMap extends ConcurrentMap, ChronicleHash { /** * Acquire a value for a key, creating if absent. * - *

If the specified key if absent in the map, {@linkplain AbstractChronicleMapBuilder#defaultValue(Object) + *

If the specified key is absent in the map, {@linkplain AbstractChronicleMapBuilder#defaultValue(Object) * default value} is taken or {@linkplain AbstractChronicleMapBuilder#defaultValueProvider(DefaultValueProvider) * default value provider} is called. Then this object is put to this map for the specified key. * From 1d1cd4e80e0a585ce16b84750abc67e8dbe22603 Mon Sep 17 00:00:00 2001 From: danielshaya Date: Thu, 13 Nov 2014 11:46:22 +0000 Subject: [PATCH 2/2] Tiny fix to JavaDoc. --- src/main/java/net/openhft/chronicle/map/ChronicleMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/openhft/chronicle/map/ChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ChronicleMap.java index 6949e9ea0..e56357b51 100644 --- a/src/main/java/net/openhft/chronicle/map/ChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ChronicleMap.java @@ -113,7 +113,7 @@ public interface ChronicleMap extends ConcurrentMap, ChronicleHash { * was constructed. If the value deserializer is able to reuse the given {@code usingValue} object, * calling this method instead of {@link #get(Object)} could help to reduce garbage creation. *

{@code
-     * 

try (ReadContext context = map.getUsingLocked(key,using)) { + * try (ReadContext context = map.getUsingLocked(key,using)) { * BondVOInterface bond = context.value().getValue(); * long issueDate = bond.getIssueDate(); * String symbol = bond.getSymbol();