mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
open a protected method for subclass extending replicated map
This commit is contained in:
@@ -1378,13 +1378,22 @@ public class ChronicleMapBuilder<K, V> implements Cloneable,
|
||||
} else {
|
||||
replication = channel.hub();
|
||||
}
|
||||
return new ReplicatedChronicleMap<K, Object, MetaBytesInterop<K, Object>,
|
||||
V, Object, MetaBytesInterop<V, Object>>(this, replication);
|
||||
return newReplicatedMap(replication);
|
||||
} else {
|
||||
return new VanillaChronicleMap<K, Object, MetaBytesInterop<K, Object>,
|
||||
V, Object, MetaBytesInterop<V, Object>>(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* create the replicated map, as subclass can self implements of map.
|
||||
* @param replication
|
||||
* @return
|
||||
*/
|
||||
protected ReplicatedChronicleMap<K, ?, ?, V, ?, ?> newReplicatedMap(AbstractReplication replication){
|
||||
return new ReplicatedChronicleMap<K, Object, MetaBytesInterop<K, Object>,
|
||||
V, Object, MetaBytesInterop<V, Object>>(this, replication);
|
||||
}
|
||||
|
||||
void preMapConstruction(boolean replicated) {
|
||||
keyBuilder.objectSerializer(acquireObjectSerializer(JDKObjectSerializer.INSTANCE));
|
||||
|
||||
Reference in New Issue
Block a user