mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Remove the complexity and API-transparency of implementing and supporting built-in serializability for marshallers and core implementation classes, as this is replaced with Wire Marshallable
This commit is contained in:
@@ -22,7 +22,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
@@ -31,7 +30,7 @@ import java.util.function.Predicate;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static net.openhft.chronicle.hash.impl.util.Objects.requireNonNull;
|
||||
|
||||
interface AbstractChronicleMap<K, V> extends ChronicleMap<K, V>, Serializable {
|
||||
interface AbstractChronicleMap<K, V> extends ChronicleMap<K, V> {
|
||||
|
||||
@Override
|
||||
default <R> R getMapped(K key, @NotNull SerializableFunction<? super V, R> function) {
|
||||
|
||||
@@ -23,10 +23,8 @@ import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
|
||||
final class MapInstanceBuilder<K, V>
|
||||
implements ChronicleHashInstanceBuilder<ChronicleMap<K, V>>, Serializable {
|
||||
final class MapInstanceBuilder<K, V> implements ChronicleHashInstanceBuilder<ChronicleMap<K, V>> {
|
||||
|
||||
final ChronicleMapBuilder<K, V> mapBuilder;
|
||||
transient SingleChronicleHashReplication singleHashReplication;
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Set;
|
||||
@@ -90,7 +89,7 @@ import static net.openhft.chronicle.hash.replication.TimeProvider.currentTime;
|
||||
*/
|
||||
public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R>
|
||||
implements Replica, Replica.EntryExternalizable {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ReplicatedChronicleMap.class);
|
||||
|
||||
public static final int ADDITIONAL_ENTRY_BYTES = 10;
|
||||
@@ -208,11 +207,6 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
|
||||
throw new IllegalStateException("localIdentifier should not be -1");
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
in.defaultReadObject();
|
||||
initOwnTransients();
|
||||
}
|
||||
|
||||
private long computeTierModIterBitSetSizeInBits() {
|
||||
return LONGS.align(actualChunksPerSegmentTier, BITS);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -53,8 +52,6 @@ public class VanillaChronicleMap<K, V, R>
|
||||
ExternalMapQueryContext<K, V, ?>>
|
||||
implements AbstractChronicleMap<K, V> {
|
||||
|
||||
private static final long serialVersionUID = 4L;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Value Data model
|
||||
Class<V> valueClass;
|
||||
@@ -161,11 +158,6 @@ public class VanillaChronicleMap<K, V, R>
|
||||
cxt = new ThreadLocal<>();
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
in.defaultReadObject();
|
||||
initOwnTransients();
|
||||
}
|
||||
|
||||
public final V checkValue(Object value) {
|
||||
if (!valueClass.isInstance(value)) {
|
||||
throw new ClassCastException("Value must be a " + valueClass.getName() +
|
||||
|
||||
Reference in New Issue
Block a user