Skip to content

Commit

Permalink
Removed ChronicleHashBuilderImpl and ChronicleMapBuilder minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
leventov committed Jul 30, 2015
1 parent a0eb9a2 commit 9b0bfc6
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public interface ChronicleHashBuilder<K, H extends ChronicleHash<K, ?, ?, ?>,
* <p>If key is a boxed primitive type or {@link Byteable} subclass, i. e. if key size is known
* statically, it is automatically accounted and shouldn't be specified by user.
*
* <p>Calling this method clears any previous {@link #constantKeySizeBySample(Object)} and
* {@link #averageKey(Object)} configurations.
*
* @param averageKeySize the average number of bytes, taken by serialized form of keys
* @return this builder back
* @throws IllegalStateException if key size is known statically and shouldn't be configured
Expand Down Expand Up @@ -129,8 +132,8 @@ public interface ChronicleHashBuilder<K, H extends ChronicleHash<K, ?, ?, ?>,
* <p>If key is a boxed primitive type or {@link Byteable} subclass, i. e. if key size is known
* statically, it is automatically accounted and shouldn't be specified by user.
*
* <p>Calling this method clears any previous {@link #constantKeySizeBySample(Object)}
* configuration.
* <p>Calling this method clears any previous {@link #constantKeySizeBySample(Object)} and
* {@link #averageKeySize(double)} configurations.
*
* @param averageKey the average (by footprint in serialized form) key, is going to be put
* into the hash containers, created by this builder
Expand All @@ -153,7 +156,8 @@ public interface ChronicleHashBuilder<K, H extends ChronicleHash<K, ?, ?, ?>,
* <p>If key size varies, method {@link #averageKeySize(double)} should be called instead of
* this one.
*
* <p>Calling this method clears any previous {@link #averageKey(Object)} configuration.
* <p>Calling this method clears any previous {@link #averageKey(Object)} and
* {@link #averageKeySize(double)} configurations.
*
* @param sampleKey the sample key
* @return this builder back
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import net.openhft.chronicle.hash.serialization.internal.MetaBytesInterop;
import net.openhft.chronicle.hash.serialization.internal.MetaProvider;
import net.openhft.chronicle.hash.serialization.internal.SerializationBuilder;
import net.openhft.chronicle.map.ChronicleMapBuilder;
import net.openhft.lang.io.Bytes;
import net.openhft.lang.io.BytesStore;
import net.openhft.lang.io.MappedStore;
Expand Down Expand Up @@ -107,7 +108,8 @@ public abstract class VanillaChronicleHash<K, KI, MKI extends MetaBytesInterop<K
transient long segmentHeadersOffset;
transient long segmentsOffset;

public VanillaChronicleHash(ChronicleHashBuilderImpl<K, ?, ?> builder, boolean replicated) {
@SuppressWarnings("deprecation")
public VanillaChronicleHash(ChronicleMapBuilder<K, ?> builder, boolean replicated) {
// Version
dataFileVersion = BuildVersion.version();

Expand All @@ -126,7 +128,7 @@ public VanillaChronicleHash(ChronicleHashBuilderImpl<K, ?, ?> builder, boolean r
entriesPerSegment = builder.entriesPerSegment(replicated);

chunkSize = builder.chunkSize(replicated);
maxChunksPerEntry = builder.maxChunksPerEntry();
maxChunksPerEntry = builder.maxChunksPerEntry(replicated);
actualChunksPerSegment = builder.actualChunksPerSegment(replicated);

// Precomputed offsets and sizes for fast Context init
Expand Down
Loading

0 comments on commit 9b0bfc6

Please sign in to comment.