Examples of jump()


Examples of tokyocabinet.BDBCUR.jump()

      if(!cursor.last())
        throw new RuntimeException("Unable to jump to last key");
     
    } else {
     
      if(!cursor.jump(nextKey.get(1)))
        throw new RuntimeException("Key should exist but failed to jump to it's location");
     
    }
   
     
View Full Code Here

Examples of tokyocabinet.BDBCUR.jump()

 
  public void push_front(String key, byte[] value) throws TException {

    BDBCUR cursor = new BDBCUR(bdb);
   
    if(!cursor.jump(key)){
      this.put(key, value);
      return;
    }
   
    //not matching key so add new
View Full Code Here

Examples of tokyocabinet.BDBCUR.jump()

 
  public byte[] pop_front(String key) throws TException{
   
    BDBCUR cursor = new BDBCUR(bdb);
   
    if(!cursor.jump(key))
      return new byte[]{};
   
    if(!Arrays.equals(cursor.key(),key.getBytes()))
      return new byte[]{};
 
View Full Code Here

Examples of tokyocabinet.BDBCUR.jump()

    if(position < 0)
      return null;
   
    BDBCUR cursor = new BDBCUR(bdb);
   
    if(!cursor.jump(key))
      return null;
   
    int currentPos = 0;
    int checkMod = 10; //verify key every few records
    while(currentPos < position){
View Full Code Here

Examples of tokyocabinet.BDBCUR.jump()

  }
 
  public int length(String key) {
    BDBCUR cursor = new BDBCUR(bdb);
   
    if(!cursor.jump(key))
      return 0;
   
    if(!Arrays.equals(cursor.key(),key.getBytes()))
      return 0;
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.