mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
introduced NativeBytesI to allow us to checks if the buffer has been closed, if the buffer is accessed after it is closed an exception is thrown, This class should be used to investigate JVM crashes, it should not be used in production code ( as its slow )
This commit is contained in:
@@ -21,7 +21,7 @@ package net.openhft.chronicle.map;
|
||||
import net.openhft.lang.Maths;
|
||||
import net.openhft.lang.collection.ATSDirectBitSet;
|
||||
import net.openhft.lang.io.DirectStore;
|
||||
import net.openhft.lang.io.NativeBytes;
|
||||
import net.openhft.lang.io.NativeBytesI;
|
||||
|
||||
import static net.openhft.lang.Maths.isPowerOf2;
|
||||
import static net.openhft.lang.MemoryUnit.*;
|
||||
@@ -39,7 +39,7 @@ enum MultiMapFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiMap create(NativeBytes bytes, NativeBytes bitSetBytes) {
|
||||
public MultiMap create(NativeBytesI bytes, NativeBytesI bitSetBytes) {
|
||||
return new ShortShortMultiMap(bytes, bitSetBytes);
|
||||
}
|
||||
},
|
||||
@@ -50,7 +50,7 @@ enum MultiMapFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiMap create(NativeBytes bytes, NativeBytes bitSetBytes) {
|
||||
public MultiMap create(NativeBytesI bytes, NativeBytesI bitSetBytes) {
|
||||
return new Int24Int24MultiMap(bytes, bitSetBytes);
|
||||
}
|
||||
},
|
||||
@@ -61,7 +61,7 @@ enum MultiMapFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiMap create(NativeBytes bytes, NativeBytes bitSetBytes) {
|
||||
public MultiMap create(NativeBytesI bytes, NativeBytesI bitSetBytes) {
|
||||
return new IntIntMultiMap(bytes, bitSetBytes);
|
||||
}
|
||||
};
|
||||
@@ -104,5 +104,5 @@ enum MultiMapFactory {
|
||||
|
||||
public abstract long sizeInBytes(long minCapacity);
|
||||
|
||||
public abstract MultiMap create(NativeBytes bytes, NativeBytes bitSetBytes);
|
||||
public abstract MultiMap create(NativeBytesI bytes, NativeBytesI bitSetBytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user