Class IdSegmentDistributorDefinition

java.lang.Object
me.ahoo.cosid.segment.IdSegmentDistributorDefinition

public class IdSegmentDistributorDefinition extends Object
Definition for an ID segment distributor configuration.

Holds the configuration parameters needed to allocate ID segments from a distributor (namespace, name, offset, step).

  • Constructor Details

    • IdSegmentDistributorDefinition

      public IdSegmentDistributorDefinition(String namespace, String name, long offset, long step)
      Creates a new definition.
      Parameters:
      namespace - the namespace
      name - the segment name
      offset - the starting offset
      step - the step size for segment allocation
  • Method Details

    • getNamespace

      public String getNamespace()
      Gets the namespace.
      Returns:
      the namespace
    • getName

      public String getName()
      Gets the segment name.
      Returns:
      the name
    • getNamespacedName

      public String 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