Clearly separated notion of entries and chunks, averageKeySize()/ValueSize() instead of keySize()/valueSize(), minor fixes and refactorings

This commit is contained in:
leventov
2014-12-26 05:22:54 +07:00
parent 06fcaa4c71
commit 81f6142af7
44 changed files with 923 additions and 587 deletions
@@ -56,7 +56,8 @@ public class OpenJDKAndHashMapExamplesTest {
ChronicleMap<String, BondVOInterface> chm = ChronicleMapBuilder
.of(String.class, BondVOInterface.class)
.keySize(10)
.averageKeySize(10)
.entries(1000)
.createPersistedTo(file);
BondVOInterface bondVO = chm.newValueInstance();
@@ -76,7 +77,8 @@ public class OpenJDKAndHashMapExamplesTest {
ChronicleMap<String, BondVOInterface> chmB = ChronicleMapBuilder
.of(String.class, BondVOInterface.class)
.keySize(10)
.averageKeySize(10)
.entries(1000)
.createPersistedTo(file);
// ZERO Copy but creates a new off heap reference each time
@@ -193,7 +193,7 @@ public class StringEncodingExamplesTest {
try (ChronicleSet<CharSequence> chineseWordSet = ChronicleSetBuilder.of(CharSequence.class)
.keyMarshaller(marshaller)
.actualSegments(1)
.actualEntriesPerSegment(1000)
.entriesPerSegment(1000)
.create()) {
chineseWordSet.add("新闻");
chineseWordSet.add("地图");
@@ -92,6 +92,6 @@ public class PingPongCASLeft {
AffinitySupport.setThreadId();
return ChronicleMapBuilder.of(String.class, BondVOInterface.class)
.entries(16)
.keySize("369604101".length()).create();
.averageKeySize("369604101".length()).create();
}
}