Add dataStoreSize field to Chronicle Map's global mutable state

This commit is contained in:
leventov
2016-02-13 21:27:30 +07:00
parent e5c37a1e8f
commit 05ccde9671
7 changed files with 87 additions and 43 deletions
@@ -17,21 +17,30 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.VanillaGlobalMutableState;
import net.openhft.chronicle.values.Array;
import net.openhft.chronicle.values.Group;
import net.openhft.chronicle.values.*;
interface ReplicatedGlobalMutableState extends VanillaGlobalMutableState {
@Group(5)
int getCurrentCleanupSegmentIndex();
void setCurrentCleanupSegmentIndex(int currentCleanupSegmentIndex);
@Group(6)
int getCurrentCleanupSegmentIndex();
void setCurrentCleanupSegmentIndex(
@Range(min = 0, max = Integer.MAX_VALUE) int currentCleanupSegmentIndex);
@Group(7)
@Align(offset = 1)
int getModificationIteratorsCount();
int addModificationIteratorsCount(@Range(min = 0, max = 128) int addition);
@Group(8)
// Align to prohibit array filling the highest bit of the previous 2-byte block, that
// complicates generated code for all fields, defined in this interface.
@Align(offset = 2)
@Array(length = 128)
boolean getModificationIteratorInitAt(int index);
void setModificationIteratorInitAt(int index, boolean init);
@Group(7)
int getModificationIteratorsCount();
int addModificationIteratorsCount(int addition);
public static void main(String[] args) {
System.setProperty("chronicle.values.dumpCode", "true");
Values.nativeClassFor(ReplicatedGlobalMutableState.class);
}
}