Examples of ChunkKey


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

      for (HColumn<byte[], byte[]> cell : cols) {
        byte[] name = cell.getName();
        if (!colInfo.sameFamily(name))
          continue;
        ChunkKey k = ChunkKey.fromBytes(colInfo.suffix(name));
        long time = cell.getClock();
        list.add(ObjectInfo.fromBytes(k, cell.getValue(), time));
      }
    }
    return map;
View Full Code Here

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

  }

  public void add(ObjectIndexKey objId, ObjectInfo link, WriteBuffer buffer)
      throws DhtException {
    CsBuffer buf = (CsBuffer) buffer;
    ChunkKey key = link.getChunkKey();
    buf.put(CF, //
        objId.asBytes(), //
        colInfo.append(key.asBytes()), //
        link.asBytes());
  }
View Full Code Here

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

    Collection<PackChunk.Members> chunkList;
    chunkList = new ArrayList<PackChunk.Members>(rows.getCount());

    for (Row<byte[], byte[], byte[]> r : rows) {
      PackChunk.Members m = new PackChunk.Members();
      ChunkKey key = ChunkKey.fromBytes(r.getKey());
      m.setChunkKey(key);

      List<HColumn<byte[], byte[]>> t = r.getColumnSlice().getColumns();
      for (HColumn<byte[], byte[]> cell : t) {
        byte[] col = cell.getName();
View Full Code Here

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

  }

  public void put(RepositoryKey repo, ChunkInfo info, WriteBuffer buffer)
      throws DhtException {
    CsBuffer buf = (CsBuffer) buffer;
    ChunkKey key = info.getChunkKey();
    buf.put(CF, //
        repo.asBytes(), //
        colChunkInfo.append(key.asBytes()), //
        info.asBytes());
  }
View Full Code Here

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

      //
      executor.submit(new Runnable() {
        public void run() {
          for (Map.Entry<ChunkKey, ChunkMeta> ent
              : toPutIntoCache.entrySet()) {
            ChunkKey key = ent.getKey();
            Change op = Change.put(nsMeta.key(key),
                ent.getValue().toByteArray());
            client.modify(singleton(op), none);
          }
        }
View Full Code Here

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

    Map<ObjectIndexKey, Collection<ObjectInfo>> out = new HashMap<ObjectIndexKey, Collection<ObjectInfo>>();

    for (ObjectIndexKey objId : objects) {
      for (MemTable.Cell cell : table.scanFamily(objId.asBytes(), colInfo)) {
        Collection<ObjectInfo> chunks = out.get(objId);
        ChunkKey chunkKey;
        if (chunks == null) {
          chunks = new ArrayList<ObjectInfo>(4);
          out.put(objId, chunks);
        }
View Full Code Here

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

    callback.onSuccess(out);
  }

  public void add(ObjectIndexKey objId, ObjectInfo info, WriteBuffer buffer)
      throws DhtException {
    ChunkKey chunk = info.getChunkKey();
    table.put(objId.asBytes(), colInfo.append(chunk.asBytes()),
        info.getData().toByteArray());
  }
View Full Code Here

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

      }
    }

    public void onPartialResult(Map<CacheKey, byte[]> result) {
      for (Map.Entry<CacheKey, byte[]> ent : result.entrySet()) {
        ChunkKey key = ChunkKey.fromBytes(ent.getKey().getBytes());
        PackChunk.Members members = decode(key, ent.getValue());

        if (streamingCallback != null) {
          streamingCallback.onPartialResult(singleton(members));
View Full Code Here

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

      // database task from being starved of time.
      //
      executor.submit(new Runnable() {
        public void run() {
          for (PackChunk.Members members : toPutIntoCache) {
            ChunkKey key = members.getChunkKey();
            Change op = Change.put(nsChunk.key(key), encode(members));
            client.modify(singleton(op), none);
          }
        }
      });
View Full Code Here

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

      }
    }

    public void onPartialResult(Map<CacheKey, byte[]> result) {
      for (Map.Entry<CacheKey, byte[]> ent : result.entrySet()) {
        ChunkKey key = ChunkKey.fromBytes(ent.getKey().getBytes());
        ChunkMeta meta;
        try {
          meta = ChunkMeta.parseFrom(ent.getValue());
        } catch (InvalidProtocolBufferException e) {
          // Invalid meta message, remove the cell from cache.
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.