mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add the interfaces from the Chronicle Engine Subscription RFC.
This commit is contained in:
@@ -2,6 +2,7 @@ package net.openhft.lang.values;
|
||||
|
||||
import net.openhft.chronicle.map.ChronicleMap;
|
||||
import net.openhft.chronicle.map.ChronicleMapBuilder;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -56,7 +57,6 @@ public class DoubleArrayTest {
|
||||
DoubleArray b = new DoubleArray(10);
|
||||
b.setData(new double[]{5, 6, 7, 8, 9});
|
||||
|
||||
|
||||
ChronicleMap<Integer, DoubleArray> proxyMap = ChronicleMapBuilder.of(Integer.class, DoubleArray.class)
|
||||
.create();
|
||||
proxyMap.put(1, a);
|
||||
@@ -66,4 +66,26 @@ public class DoubleArrayTest {
|
||||
System.out.println(proxyMap.get(2));
|
||||
proxyMap.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void addToAMap2() {
|
||||
DoubleArray.HACK = false;
|
||||
DoubleArray a = new DoubleArray(10);
|
||||
a.setData(new double[]{1, 2, 3, 4, 5});
|
||||
|
||||
DoubleArray b = new DoubleArray(10);
|
||||
b.setData(new double[]{5, 6, 7, 8, 9});
|
||||
|
||||
ChronicleMap<Integer, DoubleArray> proxyMap = ChronicleMapBuilder.of(Integer.class, DoubleArray.class)
|
||||
.averageValueSize(6 * 8)
|
||||
.create();
|
||||
proxyMap.put(1, a);
|
||||
proxyMap.put(2, b);
|
||||
|
||||
System.out.println(proxyMap.get(1));
|
||||
System.out.println(proxyMap.get(2));
|
||||
proxyMap.close();
|
||||
DoubleArray.HACK = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user