Package io.protostuff
Class MessageMapSchema<K,V>
- java.lang.Object
-
- io.protostuff.MapSchema<K,V>
-
- io.protostuff.MessageMapSchema<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.protostuff.MapSchema
MapSchema.MapWrapper<K,V>, MapSchema.MessageFactories, MapSchema.MessageFactory
-
-
Field Summary
Fields Modifier and Type Field Description Pipe.Schema<K>kPipeSchemaThe pipe schema of the message key.Schema<K>kSchemaThe schema of the message key.Pipe.Schema<V>vPipeSchemaThe pipe schema of the message value.Schema<V>vSchemaThe schema of the message value.-
Fields inherited from class io.protostuff.MapSchema
FIELD_NAME_ENTRY, FIELD_NAME_KEY, FIELD_NAME_VALUE, MESSAGE_FACTORIES_NAMES, messageFactory, pipeSchema
-
-
Constructor Summary
Constructors Constructor Description MessageMapSchema(Schema<K> kSchema, Schema<V> vSchema)MessageMapSchema(Schema<K> kSchema, Schema<V> vSchema, Pipe.Schema<K> kPipeSchema, Pipe.Schema<V> vPipeSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidputValueFrom(Input input, MapSchema.MapWrapper<K,V> wrapper, K key)Puts the entry(key and value), obtained from the input, into theMapWrapper.protected KreadKeyFrom(Input input, MapSchema.MapWrapper<K,V> wrapper)Reads the key from the input.protected voidtransferKey(Pipe pipe, Input input, Output output, int number, boolean repeated)Transfers the key from the input to the output.protected voidtransferValue(Pipe pipe, Input input, Output output, int number, boolean repeated)Transfers the value from the input to the output.protected voidwriteKeyTo(Output output, int fieldNumber, K value, boolean repeated)Writes the key to the output.protected voidwriteValueTo(Output output, int fieldNumber, V value, boolean repeated)Writes the value to the output.-
Methods inherited from class io.protostuff.MapSchema
getFieldName, getFieldNumber, isInitialized, mergeFrom, messageFullName, messageName, newMessage, typeClass, writeTo
-
-
-
-
Field Detail
-
kPipeSchema
public final Pipe.Schema<K> kPipeSchema
The pipe schema of the message key.
-
vPipeSchema
public final Pipe.Schema<V> vPipeSchema
The pipe schema of the message value.
-
-
Method Detail
-
readKeyFrom
protected K readKeyFrom(Input input, MapSchema.MapWrapper<K,V> wrapper) throws java.io.IOException
Description copied from class:MapSchemaReads the key from the input.The extra wrapper arg is internally used as an object placeholder during polymorhic deserialization.
- Specified by:
readKeyFromin classMapSchema<K,V>- Throws:
java.io.IOException
-
putValueFrom
protected void putValueFrom(Input input, MapSchema.MapWrapper<K,V> wrapper, K key) throws java.io.IOException
Description copied from class:MapSchemaPuts the entry(key and value), obtained from the input, into theMapWrapper.- Specified by:
putValueFromin classMapSchema<K,V>- Throws:
java.io.IOException
-
writeKeyTo
protected void writeKeyTo(Output output, int fieldNumber, K value, boolean repeated) throws java.io.IOException
Description copied from class:MapSchemaWrites the key to the output.- Specified by:
writeKeyToin classMapSchema<K,V>- Throws:
java.io.IOException
-
writeValueTo
protected void writeValueTo(Output output, int fieldNumber, V value, boolean repeated) throws java.io.IOException
Description copied from class:MapSchemaWrites the value to the output.- Specified by:
writeValueToin classMapSchema<K,V>- Throws:
java.io.IOException
-
transferKey
protected void transferKey(Pipe pipe, Input input, Output output, int number, boolean repeated) throws java.io.IOException
Description copied from class:MapSchemaTransfers the key from the input to the output.- Specified by:
transferKeyin classMapSchema<K,V>- Throws:
java.io.IOException
-
transferValue
protected void transferValue(Pipe pipe, Input input, Output output, int number, boolean repeated) throws java.io.IOException
Description copied from class:MapSchemaTransfers the value from the input to the output.- Specified by:
transferValuein classMapSchema<K,V>- Throws:
java.io.IOException
-
-