Package org.eclipse.jgit.storage.dht

Examples of org.eclipse.jgit.storage.dht.RepositoryKey


    return out;
  }

  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


        newData.toByteArray());
  }

  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

      if (data.length == 0)
        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;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.storage.dht.RepositoryKey

Copyright © 2018 www.massapicom. 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.