@Override protected void startQueuedOperations(int bytes) throws DhtException { client.modify(pending, wrap(none, bytes)); pending = null; }
@Override protected void startQueuedOperations(int bytes) throws DhtException { client.modify(pending, wrap(none, bytes)); pending = null; }
/** * Schedule any cache change. * * @param op * the cache operation. * @throws DhtException * a prior flush failed. */ public void modify(CacheService.Change op) throws DhtException { int sz = op.getKey().getBytes().length; if (op.getData() != null) sz += op.getData().length; if (add(sz)) { if (pending == null) pending = newList(); pending.add(op); queued(sz); } else { client.modify(singleton(op), wrap(none, sz)); } }
/** * Schedule any cache change. * * @param op * the cache operation. * @throws DhtException * a prior flush failed. */ public void modify(CacheService.Change op) throws DhtException { int sz = op.getKey().getBytes().length; if (op.getData() != null) sz += op.getData().length; if (add(sz)) { if (pending == null) pending = newList(); pending.add(op); queued(sz); } else { client.modify(singleton(op), wrap(none, sz)); } }