public class Clip extends Object implements JSONFormatter
Modifier and Type | Field and Description |
---|---|
static String |
META_KEY |
static String |
RECORDS_KEY |
GSON, INVALID_DOUBLES
Constructor and Description |
---|
Clip() |
Modifier and Type | Method and Description |
---|---|
Clip |
add(com.yahoo.bullet.record.BulletRecord record)
Adds a
BulletRecord to the records in the Clip. |
Clip |
add(Clip clip)
|
Clip |
add(List<com.yahoo.bullet.record.BulletRecord> records)
Adds all the
BulletRecord to the records in the Clip. |
Clip |
add(Meta meta)
Tags additional metadata.
|
String |
asJSON()
Convert this object to a JSON string.
|
static Clip |
of(com.yahoo.bullet.record.BulletRecord record)
Construct a Clip with the given
BulletRecord . |
static Clip |
of(List<com.yahoo.bullet.record.BulletRecord> records)
Construct a Clip with the given List of
BulletRecord . |
static Clip |
of(Meta meta)
Construct a Clip with the given metadata.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asJSON, fromJSON
public static final String META_KEY
public static final String RECORDS_KEY
public Clip add(com.yahoo.bullet.record.BulletRecord record)
BulletRecord
to the records in the Clip.record
- The input record.public Clip add(List<com.yahoo.bullet.record.BulletRecord> records)
BulletRecord
to the records in the Clip.records
- The input records.public Clip add(Meta meta)
meta
- Any Meta to add to the Clip. The objects in the Meta must be
serializable to JSON with Gson
.public String asJSON()
JSONFormatter
asJSON
in interface JSONFormatter
public static Clip of(com.yahoo.bullet.record.BulletRecord record)
BulletRecord
.record
- The input record.public static Clip of(List<com.yahoo.bullet.record.BulletRecord> records)
BulletRecord
.records
- The input records.Copyright © 2021. All rights reserved.