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:
@@ -44,6 +44,11 @@ public enum Alignment {
|
||||
int alignSize(int size) {
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
int alignment() {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -64,6 +69,11 @@ public enum Alignment {
|
||||
int alignSize(int size) {
|
||||
return (size + 3) & ~3;
|
||||
}
|
||||
|
||||
@Override
|
||||
int alignment() {
|
||||
return 4;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -84,6 +94,11 @@ public enum Alignment {
|
||||
int alignSize(int size) {
|
||||
return (size + 7) & ~7;
|
||||
}
|
||||
|
||||
@Override
|
||||
int alignment() {
|
||||
return 8;
|
||||
}
|
||||
};
|
||||
|
||||
private static final Alignment[] VALUES = values();
|
||||
@@ -97,4 +112,6 @@ public enum Alignment {
|
||||
abstract long alignAddr(long addr);
|
||||
|
||||
abstract int alignSize(int size);
|
||||
|
||||
abstract int alignment();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user