Interface BatchingThreshold<E> (2.7.1)

  public 
  
 interface 
 BatchingThreshold<E> 
 

The interface representing a threshold to be used in ThresholdBatcher. Thresholds do not need to be thread-safe if they are only used inside ThresholdBatcher.

Type Parameter

Name Description
E

Methods

accumulate(E e)

  public 
  
 abstract 
  
 void 
  
 accumulate 
 ( 
 E 
  
 e 
 ) 
 

Presents the element to the threshold for the attribute of interest to be accumulated.

Any calls into this function from ThresholdBatcher will be under a lock.

Parameter
Name Description
e E

copyWithZeroedValue()

  public 
  
 abstract 
  
 BatchingThreshold<E> 
  
 copyWithZeroedValue 
 () 
 

Make a copy of this threshold but with the accumulated value zeroed.

Any calls into this function from ThresholdBatcher will be under a lock.

Returns
Type Description
BatchingThreshold < E >

isThresholdReached()

  public 
  
 abstract 
  
 boolean 
  
 isThresholdReached 
 () 
 

Any calls into this function from ThresholdBatcher will be under a lock.

Returns
Type Description
boolean

whether the threshold has been reached.

Design a Mobile Site
View Site in Mobile | Classic
Share by: