Class ApiModuleOptionsBuilder<O>
java.lang.Object
com.scaleoutsoftware.modules.hosting.ApiModuleOptionsBuilder<O>
- Type Parameters:
O- the SOSS object type.
Used to create an
ApiModuleOptions. Specify the SOSS object type and serialization.-
Constructor Summary
ConstructorsConstructorDescriptionApiModuleOptionsBuilder(Type sossObjectType) Instantiate the builder with the SOSS object type. -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds theMsgModuleOptions.setSerialization(com.scaleout.client.caching.CacheSerializer<O> serializer, com.scaleout.client.caching.CacheDeserializer<O> deserializer, boolean isJsonSerializer) Sets theCacheSerializer,CacheDeserializer, and flag for if the SOSS objects are serialized to JSON.
-
Constructor Details
-
ApiModuleOptionsBuilder
Instantiate the builder with the SOSS object type.- Parameters:
sossObjectType- the SOSS object type.
-
-
Method Details
-
setSerialization
public ApiModuleOptionsBuilder<O> setSerialization(com.scaleout.client.caching.CacheSerializer<O> serializer, com.scaleout.client.caching.CacheDeserializer<O> deserializer, boolean isJsonSerializer) Sets theCacheSerializer,CacheDeserializer, and flag for if the SOSS objects are serialized to JSON.- Parameters:
serializer- theCacheSerializer.deserializer- theCacheDeserializer.isJsonSerializer- true if theCacheSerializeris returning serialized JSON.- Returns:
- this
ApiModuleOptionsBuilder.
-
build
builds theMsgModuleOptions. If not previously set through the available setters, the following defaults will be used: LockMode:LockMode.None. Serializer: aGsonbackedCacheSerializer. Deserializer: aGsonbackedCacheDeserializer. JSON serialization: true.- Returns:
- an instantiated
ApiModuleOptions.
-