Yuta HIGUCHI

Renamed store.serialize.{Serializer => StoreSerializer}1

Change-Id: I702a586a690fa05d4129ff5b81f927defe1ac582
......@@ -2,8 +2,7 @@ package org.onlab.onos.store.cluster.messaging;
import org.onlab.onos.cluster.NodeId;
// TODO: ClusterMessage should be aware about how to serialize the payload
// TODO: Should payload type be made generic?
// TODO: Should payload type be ByteBuffer?
/**
* Base message for cluster-wide communications.
*/
......@@ -12,7 +11,6 @@ public class ClusterMessage {
private final NodeId sender;
private final MessageSubject subject;
private final byte[] payload;
// TODO: add field specifying Serializer for payload
/**
* Creates a cluster message.
......
......@@ -16,7 +16,7 @@ import org.onlab.onos.event.Event;
import org.onlab.onos.store.AbstractStore;
import org.onlab.onos.store.StoreDelegate;
import org.onlab.onos.store.serializers.KryoSerializer;
import org.onlab.onos.store.serializers.Serializer;
import org.onlab.onos.store.serializers.StoreSerializer;
import org.slf4j.Logger;
import static com.google.common.base.Preconditions.checkNotNull;
......@@ -34,7 +34,7 @@ public abstract class AbstractHazelcastStore<E extends Event, D extends StoreDel
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected StoreService storeService;
protected Serializer serializer;
protected StoreSerializer serializer;
protected HazelcastInstance theInstance;
......
......@@ -2,7 +2,7 @@ package org.onlab.onos.store.common;
import static com.google.common.base.Preconditions.checkNotNull;
import org.onlab.onos.store.serializers.Serializer;
import org.onlab.onos.store.serializers.StoreSerializer;
import com.google.common.base.Optional;
import com.google.common.cache.CacheLoader;
......@@ -18,7 +18,7 @@ import com.hazelcast.core.IMap;
public final class OptionalCacheLoader<K, V> extends
CacheLoader<K, Optional<V>> {
private final Serializer serializer;
private final StoreSerializer serializer;
private IMap<byte[], byte[]> rawMap;
/**
......@@ -27,7 +27,7 @@ public final class OptionalCacheLoader<K, V> extends
* @param serializer to use for serialization
* @param rawMap underlying IMap
*/
public OptionalCacheLoader(Serializer serializer, IMap<byte[], byte[]> rawMap) {
public OptionalCacheLoader(StoreSerializer serializer, IMap<byte[], byte[]> rawMap) {
this.serializer = checkNotNull(serializer);
this.rawMap = checkNotNull(rawMap);
}
......
......@@ -7,9 +7,9 @@ import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
/**
* Serializer implementation using Kryo.
* StoreSerializer implementation using Kryo.
*/
public class KryoSerializer implements Serializer {
public class KryoSerializer implements StoreSerializer {
private final Logger log = LoggerFactory.getLogger(getClass());
protected KryoPool serializerPool;
......
......@@ -6,7 +6,7 @@ import java.nio.ByteBuffer;
/**
* Service to serialize Objects into byte array.
*/
public interface Serializer {
public interface StoreSerializer {
/**
* Serializes the specified object into bytes.
......