@Test public void delPrefix() throws Exception { RKv kv = db.getrKv(); String head = "delPrefixA"; try { for (int i = 0; i < 10 * 10000; i++) { kv.set(head + i, ("test" + i).getBytes()); } kv.delPrefix(head); for (int i = 0; i < 10 * 10000; i++) { byte[] bytes = kv.get(head + i); Assert.assertNull(bytes); } } finally { kv.delPrefix(head); } }
public void delPrefix(String key_) throws KitDBException { checkTxRange(); byte[] keyb_ = getKey(key_); try (CloseLock ignored = checkClose()) { start(); deleteHead(ArrayKits.addAll(HEAD_B, keyb_), SstColumnFamily.DEFAULT); deleteHead(ArrayKits.addAll(HEAD_TTL, keyb_), SstColumnFamily.DEFAULT); commit(); } finally { release(); } }
RKv extends RBase { public void delPrefix(String key_) throws KitDBException { checkTxRange(); byte[] keyb_ = getKey(key_); try (CloseLock ignored = checkClose()) { start(); deleteHead(ArrayKits.addAll(HEAD_B, keyb_), SstColumnFamily.DEFAULT); deleteHead(ArrayKits.addAll(HEAD_TTL, keyb_), SstColumnFamily.DEFAULT); commit(); } finally { release(); } } }
RKv extends RBase { public void delPrefix(String key_) throws KitDBException { checkTxRange(); byte[] keyb_ = getKey(key_); try (CloseLock ignored = checkClose()) { start(); deleteHead(ArrayKits.addAll(HEAD_B, keyb_), SstColumnFamily.DEFAULT); deleteHead(ArrayKits.addAll(HEAD_TTL, keyb_), SstColumnFamily.DEFAULT); commit(); } finally { release(); } } protected  RKv(DB db); }
RKv extends RBase { public void delPrefix(String key_) throws KitDBException { checkTxRange(); byte[] keyb_ = getKey(key_); try (CloseLock ignored = checkClose()) { start(); deleteHead(ArrayKits.addAll(HEAD_B, keyb_), SstColumnFamily.DEFAULT); deleteHead(ArrayKits.addAll(HEAD_TTL, keyb_), SstColumnFamily.DEFAULT); commit(); } finally { release(); } } protected  RKv(DB db); void set(String key, byte[] value); long incr(String key, int step, int ttl); long incr(String key, int step); void set(Map<String, byte[]> map); void set(Map<String, byte[]> map, int ttl); void set(String key, byte[] value, int ttl); void ttl(String key, int ttl); Map<String, byte[]> get(List<String> keys); byte[] get(String key); byte[] getNoTTL(String key); void del(String key); void delPrefix(String key_); List<String> keys(String key_, int start, int limit); }
RKv extends RBase { public void delPrefix(String key_) throws KitDBException { checkTxRange(); byte[] keyb_ = getKey(key_); try (CloseLock ignored = checkClose()) { start(); deleteHead(ArrayKits.addAll(HEAD_B, keyb_), SstColumnFamily.DEFAULT); deleteHead(ArrayKits.addAll(HEAD_TTL, keyb_), SstColumnFamily.DEFAULT); commit(); } finally { release(); } } protected  RKv(DB db); void set(String key, byte[] value); long incr(String key, int step, int ttl); long incr(String key, int step); void set(Map<String, byte[]> map); void set(Map<String, byte[]> map, int ttl); void set(String key, byte[] value, int ttl); void ttl(String key, int ttl); Map<String, byte[]> get(List<String> keys); byte[] get(String key); byte[] getNoTTL(String key); void del(String key); void delPrefix(String key_); List<String> keys(String key_, int start, int limit); final static String HEAD; final static byte[] HEAD_TTL; final static byte[] HEAD_B; }