Class AbstractMapMarshaller<K, V, T extends Map<K,V>>
java.lang.Object
org.wildfly.clustering.marshalling.protostream.util.AbstractMapMarshaller<K,V,T>
- Type Parameters:
K- the map key typeV- the map value typeT- the map type of this marshaller
- All Implemented Interfaces:
org.infinispan.protostream.BaseMarshaller<T>, org.infinispan.protostream.ProtobufTagMarshaller<T>, Marshallable<T>, ProtoStreamMarshaller<T>, Readable<T>, Writable<T>
- Direct Known Subclasses:
LinkedHashMapMarshaller, MapMarshaller, SortedMapMarshaller
public abstract class AbstractMapMarshaller<K, V, T extends Map<K,V>>
extends Object
implements ProtoStreamMarshaller<T>
Abstract marshaller for a
Map that writes the entries of the map.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.protostream.ProtobufTagMarshaller
org.infinispan.protostream.ProtobufTagMarshaller.OperationContext, org.infinispan.protostream.ProtobufTagMarshaller.ReadContext, org.infinispan.protostream.ProtobufTagMarshaller.WriteContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intIndex of the repeated entry fieldFields inherited from interface org.infinispan.protostream.BaseMarshaller
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMapMarshaller(Class<? extends T> mapClass) Creates a new map marshaller for the specified implementation class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of object handled by this marshallable instance.voidwriteTo(ProtoStreamWriter writer, T map) Writes the specified object to the specified writer.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.protostream.BaseMarshaller
getSubClassNamesMethods inherited from interface Marshallable
sizeMethods inherited from interface ProtoStreamMarshaller
getTypeName, read, wrap, wrap, write
-
Field Details
-
ENTRY_INDEX
protected static final int ENTRY_INDEXIndex of the repeated entry field- See Also:
-
-
Constructor Details
-
AbstractMapMarshaller
-
-
Method Details
-
writeTo
Description copied from interface:WritableWrites the specified object to the specified writer.- Specified by:
writeToin interfaceWritable<K>- Parameters:
writer- a ProtoStream writermap- the object to be written- Throws:
IOException- if the object could not be written
-
getJavaClass
Description copied from interface:MarshallableReturns the type of object handled by this marshallable instance.- Specified by:
getJavaClassin interfaceorg.infinispan.protostream.BaseMarshaller<K>- Specified by:
getJavaClassin interfaceMarshallable<K>- Returns:
- the type of object handled by this marshallable instance.
-