Package me.ahoo.cosid.segment
Class IdSegmentDistributorDefinition
java.lang.Object
me.ahoo.cosid.segment.IdSegmentDistributorDefinition
Definition for an ID segment distributor configuration.
Holds the configuration parameters needed to allocate ID segments from a distributor (namespace, name, offset, step).
-
Constructor Summary
ConstructorsConstructorDescriptionIdSegmentDistributorDefinition(String namespace, String name, long offset, long step) Creates a new definition. -
Method Summary
-
Constructor Details
-
IdSegmentDistributorDefinition
Creates a new definition.- Parameters:
namespace- the namespacename- the segment nameoffset- the starting offsetstep- the step size for segment allocation
-
-
Method Details
-
getNamespace
Gets the namespace.- Returns:
- the namespace
-
getName
Gets the segment name.- Returns:
- the name
-
getNamespacedName
Gets the full namespaced name.- Returns:
- namespace.name
-
getOffset
public long getOffset()Gets the starting offset.- Returns:
- the offset
-
getStep
public long getStep()Gets the step size.- Returns:
- the step
-