Class ContextDescriptorHashSegmented
java.lang.Object
com.espertech.esper.common.client.soda.ContextDescriptorHashSegmented
- All Implemented Interfaces:
ContextDescriptor
,Serializable
Hash-segmented context.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.ContextDescriptorHashSegmented
(List<ContextDescriptorHashSegmentedItem> items, int granularity, boolean preallocate) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the granularity.getItems()
Returns hash items.boolean
Returns flag indicating whether to allocate context partitions upon statement creation, or only when actually referred tovoid
setGranularity
(int granularity) Sets the granularity.void
Sets categoriesvoid
setPreallocate
(boolean preallocate) Set the flag indicating whether to allocate context partitions upon statement creation, or only when actually referred tovoid
toEPL
(StringWriter writer, EPStatementFormatter formatter) Format as EPL.
-
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 togranularity
- a number between 1 and Integer.MAX for parallelismpreallocate
- 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
Sets categories- Parameters:
items
- categories to set
-
toEPL
Description copied from interface:ContextDescriptor
Format as EPL.- Specified by:
toEPL
in interfaceContextDescriptor
- Parameters:
writer
- outputformatter
- formatter
-