/** * Construct a Clip with the given List of {@link BulletRecord}. * * @param records The input records. * @return The created Clip. */ public static Clip of(List<BulletRecord> records) { return new Clip().add(records); }
/** * Construct a Clip with the given metadata. * * @param meta The Meta to add. The objects in the Meta must be serializable to JSON * with {@link com.google.gson.Gson}. * @return This object for chaining */ public static Clip of(Meta meta) { return new Clip().add(meta); } }
/** * Construct a Clip with the given {@link BulletRecord}. * * @param record The input record. * @return The created Clip. */ public static Clip of(BulletRecord record) { return new Clip().add(record); }
/** * Returns the {@link List} of {@link BulletRecord} result so far. See {@link #getResult()} for the full result * with metadata. * * @return The records that are part of the result. */ @Override public List<BulletRecord> getRecords() { try { incrementRate(); Clip result = new Clip(); result.add(window.getRecords()); result = postAggregate(result); return result.getRecords(); } catch (RuntimeException e) { log.error("Unable to get serialized result for query {}", this); return null; } }