Example usage for org.eclipse.jgit.internal.storage.dfs DfsPackDescription setLastModified

List of usage examples for org.eclipse.jgit.internal.storage.dfs DfsPackDescription setLastModified

Introduction

In this page you can find the example usage for org.eclipse.jgit.internal.storage.dfs DfsPackDescription setLastModified.

Prototype

public DfsPackDescription setLastModified(long timeMillis) 

Source Link

Document

Set time the pack was created, in milliseconds.

Usage

From source file:com.benhumphreys.jgitcassandra.store.ObjStore.java

License:Apache License

/**
 * Converts a row to a DfsPackDescription
 *///from ww  w  .j a v  a2s.co m
private DfsPackDescription rowToPackDescription(Row row) {
    final String name = row.getString("name");
    final int source = row.getInt("source");
    final long lastModified = row.getLong("last_modified");
    final Map<String, Long> sizeMap = row.getMap("size_map", String.class, Long.class);
    final long objectCount = row.getLong("object_count");
    final long deltaCount = row.getLong("delta_count");
    final int extensions = row.getInt("extensions");
    final int indexVersion = row.getInt("index_version");

    DfsPackDescription desc = new DfsPackDescription(repoDesc, name);

    desc.setPackSource(DfsObjDatabase.PackSource.values()[source]);
    desc.setLastModified(lastModified);
    DescMapper.setFileSizeMap(desc, sizeMap);
    desc.setObjectCount(objectCount);
    desc.setDeltaCount(deltaCount);
    DescMapper.setExtsFromBits(desc, extensions);
    desc.setIndexVersion(indexVersion);

    return desc;
}