mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Clearly separated notion of entries and chunks, averageKeySize()/ValueSize() instead of keySize()/valueSize(), minor fixes and refactorings
This commit is contained in:
@@ -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("地图");
|
||||
|
||||
+1
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user