mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add ChronicleMap.readKey() and readValue() for convenient work with BytesMapEventListener
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.Assert;
|
||||
|
||||
@@ -245,6 +246,16 @@ public class ReplicationCheckingMap<K, V> implements ChronicleMap<K, V> {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public K readKey(Bytes entry, long keyPos) {
|
||||
return map1.readKey(entry, keyPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public V readValue(Bytes entry, long valuePos) {
|
||||
return map1.readValue(entry, valuePos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<K> keyClass() {
|
||||
return map1.keyClass();
|
||||
|
||||
@@ -19,6 +19,7 @@ package net.openhft.chronicle.map.jsr166.map;
|
||||
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
|
||||
import net.openhft.chronicle.map.*;
|
||||
import net.openhft.chronicle.map.jsr166.JSR166TestCase;
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -198,6 +199,16 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public K readKey(Bytes entry, long keyPos) {
|
||||
return d.readKey(entry, keyPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public V readValue(Bytes entry, long valuePos) {
|
||||
return d.readValue(entry, valuePos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<K> keyClass() {
|
||||
return d.keyClass();
|
||||
|
||||
Reference in New Issue
Block a user