@Test public void testMinTimestamp() { VarBitTimeSeries series = new VarBitTimeSeries(); thrown.expect(IllegalArgumentException.class); series.append(-1, 1); }
public synchronized void append(long timestamp, double value) { if (timestamp < 0 || timestamp > MAX_UNIX_TIMESTAMP) { throw new IllegalArgumentException("Timestamp is not a valid unix timestamp: " + timestamp); } if (size == 0) { appendFirstPoint(timestamp, value); } else { appendNextPoint(timestamp, value); } size++; }
VarBitTimeSeries { public synchronized void append(long timestamp, double value) { if (timestamp < 0 || timestamp > MAX_UNIX_TIMESTAMP) { throw new IllegalArgumentException("Timestamp is not a valid unix timestamp: " + timestamp); } if (size == 0) { appendFirstPoint(timestamp, value); } else { appendNextPoint(timestamp, value); } size++; } }
VarBitTimeSeries { public synchronized void append(long timestamp, double value) { if (timestamp < 0 || timestamp > MAX_UNIX_TIMESTAMP) { throw new IllegalArgumentException("Timestamp is not a valid unix timestamp: " + timestamp); } if (size == 0) { appendFirstPoint(timestamp, value); } else { appendNextPoint(timestamp, value); } size++; } VarBitTimeSeries(); }
VarBitTimeSeries { public synchronized void append(long timestamp, double value) { if (timestamp < 0 || timestamp > MAX_UNIX_TIMESTAMP) { throw new IllegalArgumentException("Timestamp is not a valid unix timestamp: " + timestamp); } if (size == 0) { appendFirstPoint(timestamp, value); } else { appendNextPoint(timestamp, value); } size++; } VarBitTimeSeries(); synchronized void append(long timestamp, double value); synchronized TimeSeriesIterator read(); Map<String, Double> getStats(); int getSerializedByteSize(); void serialize(ByteBuffer buffer); static TimeSeriesIterator deserialize(final ByteBuffer buffer); }
VarBitTimeSeries { public synchronized void append(long timestamp, double value) { if (timestamp < 0 || timestamp > MAX_UNIX_TIMESTAMP) { throw new IllegalArgumentException("Timestamp is not a valid unix timestamp: " + timestamp); } if (size == 0) { appendFirstPoint(timestamp, value); } else { appendNextPoint(timestamp, value); } size++; } VarBitTimeSeries(); synchronized void append(long timestamp, double value); synchronized TimeSeriesIterator read(); Map<String, Double> getStats(); int getSerializedByteSize(); void serialize(ByteBuffer buffer); static TimeSeriesIterator deserialize(final ByteBuffer buffer); static final long MAX_UNIX_TIMESTAMP; static final int BLOCK_HEADER_OFFSET_SECS; static final short DEFAULT_TIMESTAMP_BITSTREAM_SIZE; static final short DEFAULT_VALUE_BITSTREAM_SIZE; }