DATA - The type of data-items handled by the policiespublic class MultiEvictionPolicy<DATA> extends Object implements ActiveEvictionPolicy<DATA>
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiEvictionPolicy.EvictionStrategy
This enum provides the different options for the eviction strategy.
|
| Constructor and Description |
|---|
MultiEvictionPolicy(EvictionPolicy<DATA>... evictionPolicies)
This policy provides the ability to use multiple eviction policies at the
same time.
|
MultiEvictionPolicy(MultiEvictionPolicy.EvictionStrategy strategy,
EvictionPolicy<DATA>... evictionPolicies)
This policy provides the ability to use multiple eviction policies at the
same time.
|
| Modifier and Type | Method and Description |
|---|---|
int |
notifyEviction(DATA datapoint,
boolean triggered,
int bufferSize)
Proves if and how many elements should be deleted from the element
buffer.
|
int |
notifyEvictionWithFakeElement(Object datapoint,
int bufferSize)
Proves if and how many elements should be deleted from the element
buffer.
|
public MultiEvictionPolicy(EvictionPolicy<DATA>... evictionPolicies)
MultiEvictionPolicy(EvictionStrategy, EvictionPolicy...)
.evictionPolicies - Any active or not active eviction policies. Both types can be
used at the same time.public MultiEvictionPolicy(MultiEvictionPolicy.EvictionStrategy strategy, EvictionPolicy<DATA>... evictionPolicies)
strategy - the strategy to be used. See MultiEvictionPolicy.EvictionStrategy for a
list of possible options.evictionPolicies - Any active or not active eviction policies. Both types can be
used at the same time.public int notifyEviction(DATA datapoint, boolean triggered, int bufferSize)
EvictionPolicynotifyEviction in interface EvictionPolicy<DATA>datapoint - data point the data point which arrivedtriggered - Information whether the UDF was triggered or notbufferSize - The current size of the element buffer at the operatorpublic int notifyEvictionWithFakeElement(Object datapoint, int bufferSize)
ActiveEvictionPolicynotifyEvictionWithFakeElement in interface ActiveEvictionPolicy<DATA>datapoint - the current fake data pointbufferSize - the current size of the buffer (only real elements are
counted)Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.