Ejemplo n.º 1
0
 /**
  * The queue method puts each processed key into a KeyBuffer that is eventually sent to the server
  * when update() is called
  *
  * @param keyString
  */
 private void queue(String keyString) {
   keybuf.add(keyString);
   updateTimer.schedule(1);
 }
Ejemplo n.º 2
0
 /**
  * The update method sends the current Keys in the buffer to the server at specified intervals.
  */
 protected synchronized void update() {
   if (!isClosed) {
     vTerm.sendBytes(keybuf.drain());
     updateTimer.schedule(50);
   }
 }
Ejemplo n.º 3
0
 static long sizeOf(KeyBuffer key, byte[] value) {
   // calculate the same value as the original impl would do
   return Util.ENTRY_OFF_DATA + Util.roundUpTo8(key.array().length) + value.length;
 }