Exemple #1
0
  public synchronized void put(long time, long value) throws IOException {
    byte[] buffer = DataOutputX.toBytes5(value);
    int pos = _offset(time);

    // increase count if new one
    if (DataInputX.toLong5(this.memBuffer, pos) == 0) {
      addCount(1);
    }

    System.arraycopy(buffer, 0, this.memBuffer, pos, _keyLength);
    this.dirty = true;
  }
Exemple #2
0
 public synchronized long get(long time) throws IOException {
   int pos = _offset(time);
   return DataInputX.toLong5(this.memBuffer, pos);
 }