public class RawStrategy extends Object implements Strategy
BulletRecord
.
A call to getData()
or getResult()
will return the current collection of
records, which is a List
of BulletRecord
.
A call to combine(byte[])
with the result of getData()
will combine records from
the List
till the aggregation size is reached.
This Strategy
will only consume or combine till the specified aggregation size is reached.Constructor and Description |
---|
RawStrategy(Aggregation aggregation,
BulletConfig config)
Constructor that takes in an
Aggregation and a BulletConfig . |
Modifier and Type | Method and Description |
---|---|
void |
combine(byte[] data)
|
void |
consume(com.yahoo.bullet.record.BulletRecord data)
Consumes a single
BulletRecord into this Monoid. |
byte[] |
getData()
|
List<com.yahoo.bullet.record.BulletRecord> |
getRecords()
Gets the aggregated records so far since the last call to
reset() . |
Clip |
getResult()
Gets the aggregated records so far since the last call to
reset() . |
boolean |
isClosed()
Returns false if more data should not be consumed or combined.
|
void |
reset()
Reset the data so far and make this the identity element for the Monoid with respect to inserting data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetadata
public RawStrategy(Aggregation aggregation, BulletConfig config)
Aggregation
and a BulletConfig
. The size of the aggregation is used
as a LIMIT operation.aggregation
- The aggregation that specifies how and what this will compute.config
- The config that has relevant configs for this strategy.public boolean isClosed()
Strategy
public void consume(com.yahoo.bullet.record.BulletRecord data)
Monoidal
BulletRecord
into this Monoid.public void combine(byte[] data)
public byte[] getData()
public Clip getResult()
reset()
. The records have a size that is at
most the maximum specified by the Aggregation
.public List<com.yahoo.bullet.record.BulletRecord> getRecords()
reset()
. The records have a size that is at
most the maximum specified by the Aggregation
.getRecords
in interface Monoidal
List
of the records so far.Copyright © 2021. All rights reserved.