Package org.eclipse.jgit.storage.dht

Examples of org.eclipse.jgit.storage.dht.RepositoryKey.asBytes()


  public boolean compareAndPut(RefKey refKey, RefData oldData, RefData newData)
      throws DhtException, TimeoutException {
    RepositoryKey repo = refKey.getRepositoryKey();
    return table.compareAndSet( //
        repo.asBytes(), //
        colRef.append(refKey.asBytes()), //
        oldData != RefDataUtil.NONE ? oldData.toByteArray() : null, //
        newData.toByteArray());
  }
View Full Code Here


  public boolean compareAndRemove(RefKey refKey, RefData oldData)
      throws DhtException, TimeoutException {
    RepositoryKey repo = refKey.getRepositoryKey();
    return table.compareAndSet( //
        repo.asBytes(), //
        colRef.append(refKey.asBytes()), //
        oldData != RefDataUtil.NONE ? oldData.toByteArray() : null, //
        null);
  }
}
View Full Code Here

        return null;
      return RepositoryKey.fromBytes(data);
    }

    RepositoryKey key = db.get(name);
    data = key != null ? key.asBytes() : new byte[0];
    client.modify(singleton(Change.put(memKey, data)), none);
    return key;
  }

  public void putUnique(RepositoryName name, RepositoryKey key)
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.