com.espertech.esper.client.soda
Class ContextDescriptorHashSegmented

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

public class ContextDescriptorHashSegmented
extends java.lang.Object
implements ContextDescriptor

Hash-segmented context.

See Also:
Serialized Form

Constructor Summary
ContextDescriptorHashSegmented()
          Ctor.
ContextDescriptorHashSegmented(java.util.List<ContextDescriptorHashSegmentedItem> items, int granularity, boolean preallocate)
          Ctor.
 
Method Summary
 int getGranularity()
          Returns the granularity.
 java.util.List<ContextDescriptorHashSegmentedItem> getItems()
          Returns hash items.
 boolean isPreallocate()
          Returns flag indicating whether to allocate context partitions upon statement creation, or only when actually referred to
 void setGranularity(int granularity)
          Sets the granularity.
 void setItems(java.util.List<ContextDescriptorHashSegmentedItem> items)
          Sets categories
 void setPreallocate(boolean preallocate)
          Set the flag indicating whether to allocate context partitions upon statement creation, or only when actually referred to
 void toEPL(java.io.StringWriter writer, EPStatementFormatter formatter)
          Format as EPL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextDescriptorHashSegmented

public ContextDescriptorHashSegmented()
Ctor.


ContextDescriptorHashSegmented

public ContextDescriptorHashSegmented(java.util.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 Detail

getItems

public java.util.List<ContextDescriptorHashSegmentedItem> 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(java.util.List<ContextDescriptorHashSegmentedItem> items)
Sets categories

Parameters:
items - categories to set

toEPL

public void toEPL(java.io.StringWriter writer,
                  EPStatementFormatter formatter)
Description copied from interface: ContextDescriptor
Format as EPL.

Specified by:
toEPL in interface ContextDescriptor
Parameters:
writer - output
formatter - formatter

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com