Package org.rostore.client.mapper
Class NativeMapper
java.lang.Object
org.rostore.client.mapper.NativeMapper
- All Implemented Interfaces:
Mapper
This one uses the native serializer of the ro-store
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,V> InputStream fromObject(V value, K key) Serialization functionThe content type of the input streamorg.rostore.mapper.MapperProperties<K,V> V toObject(InputStream inputStream, Class<V> valueClass, K key) Deserialization function
-
Constructor Details
-
NativeMapper
public NativeMapper(org.rostore.mapper.MapperProperties mapperProperties)
-
-
Method Details
-
getMapperProperties
public org.rostore.mapper.MapperProperties getMapperProperties() -
fromObject
Serialization function- Specified by:
fromObjectin interfaceMapper- Type Parameters:
K- the key typeV- the value type- Parameters:
value- the value objectkey- the key object- Returns:
- the serialized input stream
-
toObject
Deserialization function -
getContentType
The content type of the input stream- Specified by:
getContentTypein interfaceMapper- Returns:
- the content type used in the header
-