Class ContextDescriptorHashSegmented

java.lang.Object
com.espertech.esper.common.client.soda.ContextDescriptorHashSegmented
All Implemented Interfaces:
ContextDescriptor, Serializable

public class ContextDescriptorHashSegmented extends Object implements ContextDescriptor
Hash-segmented context.
See Also:
  • Constructor Details

    • ContextDescriptorHashSegmented

      public ContextDescriptorHashSegmented()
      Ctor.
    • ContextDescriptorHashSegmented

      public ContextDescriptorHashSegmented(List<ContextDescriptorHashSegmentedItem> items, int granularity, boolean preallocate)
      Ctor.
      Parameters:
      items - list of hash code functions and event types to apply to
      granularity - a number between 1 and Integer.MAX for parallelism
      preallocate - true to allocate each context partition at time of statement creation
  • Method Details

    • getItems

      Returns hash items.
      Returns:
      hash items
    • getGranularity

      public int getGranularity()
      Returns the granularity.
      Returns:
      granularity
    • setGranularity

      public void setGranularity(int granularity)
      Sets the granularity.
      Parameters:
      granularity - granularity to set
    • isPreallocate

      public boolean isPreallocate()
      Returns flag indicating whether to allocate context partitions upon statement creation, or only when actually referred to
      Returns:
      preallocation flag
    • setPreallocate

      public void setPreallocate(boolean preallocate)
      Set the flag indicating whether to allocate context partitions upon statement creation, or only when actually referred to
      Parameters:
      preallocate - preallocation flag
    • setItems

      public void setItems(List<ContextDescriptorHashSegmentedItem> items)
      Sets categories
      Parameters:
      items - categories to set
    • toEPL

      public void toEPL(StringWriter writer, EPStatementFormatter formatter)
      Description copied from interface: ContextDescriptor
      Format as EPL.
      Specified by:
      toEPL in interface ContextDescriptor
      Parameters:
      writer - output
      formatter - formatter