Class StringMapSchema<V>
-
Nested Class Summary
Nested classes/interfaces inherited from class MapSchema
MapSchema.MapWrapper<K,V>, MapSchema.MessageFactories, MapSchema.MessageFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMapSchema<String> The schema forMap<String,String>final Pipe.Schema<V> The pipe schema of the message value.The schema of the message value.Fields inherited from class MapSchema
FIELD_NAME_ENTRY, FIELD_NAME_KEY, FIELD_NAME_VALUE, MESSAGE_FACTORIES_NAMES, messageFactory, pipeSchema -
Constructor Summary
ConstructorsConstructorDescriptionStringMapSchema(Schema<V> vSchema) StringMapSchema(Schema<V> vSchema, Pipe.Schema<V> vPipeSchema) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidputValueFrom(Input input, MapSchema.MapWrapper<String, V> wrapper, String key) Puts the entry(key and value), obtained from the input, into theMapWrapper.protected final StringreadKeyFrom(Input input, MapSchema.MapWrapper<String, 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 final voidwriteKeyTo(Output output, int fieldNumber, String 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 MapSchema
getFieldName, getFieldNumber, isInitialized, mergeFrom, messageFullName, messageName, newMessage, typeClass, writeTo
-
Field Details
-
VALUE_STRING
The schema forMap<String,String> -
vSchema
-
vPipeSchema
The pipe schema of the message value.
-
-
Constructor Details
-
StringMapSchema
-
StringMapSchema
-
-
Method Details
-
readKeyFrom
protected final String readKeyFrom(Input input, MapSchema.MapWrapper<String, V> wrapper) throws IOExceptionDescription 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<String,V> - Throws:
IOException
-
putValueFrom
protected void putValueFrom(Input input, MapSchema.MapWrapper<String, V> wrapper, String key) throws IOExceptionDescription copied from class:MapSchemaPuts the entry(key and value), obtained from the input, into theMapWrapper.- Specified by:
putValueFromin classMapSchema<String,V> - Throws:
IOException
-
writeKeyTo
protected final void writeKeyTo(Output output, int fieldNumber, String value, boolean repeated) throws IOException Description copied from class:MapSchemaWrites the key to the output.- Specified by:
writeKeyToin classMapSchema<String,V> - Throws:
IOException
-
writeValueTo
protected void writeValueTo(Output output, int fieldNumber, V value, boolean repeated) throws IOException Description copied from class:MapSchemaWrites the value to the output.- Specified by:
writeValueToin classMapSchema<String,V> - Throws:
IOException
-
transferKey
protected void transferKey(Pipe pipe, Input input, Output output, int number, boolean repeated) throws IOException Description copied from class:MapSchemaTransfers the key from the input to the output.- Specified by:
transferKeyin classMapSchema<String,V> - Throws:
IOException
-
transferValue
protected void transferValue(Pipe pipe, Input input, Output output, int number, boolean repeated) throws IOException Description copied from class:MapSchemaTransfers the value from the input to the output.- Specified by:
transferValuein classMapSchema<String,V> - Throws:
IOException
-