Package io.atomix.primitive.config
Class PrimitiveConfig<C extends PrimitiveConfig<C>>
java.lang.Object
io.atomix.primitive.config.PrimitiveConfig<C>
- All Implemented Interfaces:
io.atomix.utils.config.Config,io.atomix.utils.config.NamedConfig<C>,io.atomix.utils.config.TypedConfig<PrimitiveType>
public abstract class PrimitiveConfig<C extends PrimitiveConfig<C>> extends Object implements io.atomix.utils.config.TypedConfig<PrimitiveType>, io.atomix.utils.config.NamedConfig<C>
Primitive configuration.
-
Constructor Summary
Constructors Constructor Description PrimitiveConfig() -
Method Summary
Modifier and Type Method Description StringgetName()io.atomix.utils.serializer.NamespaceConfiggetNamespaceConfig()Returns the serializer configuration.PrimitiveProtocolConfiggetProtocolConfig()Returns the protocol configuration.booleanisReadOnly()Returns whether the primitive is read-only.CsetName(String name)CsetNamespaceConfig(io.atomix.utils.serializer.NamespaceConfig namespaceConfig)Sets the serializer configuration.CsetProtocolConfig(PrimitiveProtocolConfig protocolConfig)Sets the protocol configuration.CsetReadOnly()Sets the primitive to read-only.CsetReadOnly(boolean readOnly)Sets whether the primitive is read-only.
-
Constructor Details
-
PrimitiveConfig
public PrimitiveConfig()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceio.atomix.utils.config.NamedConfig<C extends PrimitiveConfig<C>>
-
setName
- Specified by:
setNamein interfaceio.atomix.utils.config.NamedConfig<C extends PrimitiveConfig<C>>
-
getNamespaceConfig
public io.atomix.utils.serializer.NamespaceConfig getNamespaceConfig()Returns the serializer configuration.- Returns:
- the serializer configuration
-
setNamespaceConfig
Sets the serializer configuration.- Parameters:
namespaceConfig- the serializer configuration- Returns:
- the primitive configuration
-
getProtocolConfig
Returns the protocol configuration.- Returns:
- the protocol configuration
-
setProtocolConfig
Sets the protocol configuration.- Parameters:
protocolConfig- the protocol configuration- Returns:
- the primitive configuration
-
setReadOnly
Sets the primitive to read-only.- Returns:
- the primitive configuration
-
setReadOnly
Sets whether the primitive is read-only.- Parameters:
readOnly- whether the primitive is read-only- Returns:
- the primitive configuration
-
isReadOnly
public boolean isReadOnly()Returns whether the primitive is read-only.- Returns:
- whether the primitive is read-only
-