diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2011-05-13 09:16:58 -0700 |
---|---|---|
committer | Chris Aniszczyk <caniszczyk@gmail.com> | 2011-05-25 09:08:33 -0500 |
commit | b8c508e54d64628660aa0d907b37a9648923c1f5 (patch) | |
tree | 222c48b34df9b4b9f70c725f3c3f1f56c2b42414 /org.eclipse.jgit/src/org/eclipse/jgit/util | |
parent | 6ec6169215eb33683728c583e231eb5fe9617813 (diff) | |
download | jgit-b8c508e54d64628660aa0d907b37a9648923c1f5.tar.gz jgit-b8c508e54d64628660aa0d907b37a9648923c1f5.zip |
DHT: Add sequence RefData
RefData now uses a sequence number as part of the field, ensuring
that updates always increase the sequence number by one whenever
a reference is modified.
Attaching a sequence number to RefData will help with storing
reference log entries during updates. As the sequence number should
be unique within the reference name space, log entries can be keyed
by the sequence number and remain unique. Making this work over
reference delete-create cycles will require an additional RefTable
API to return the oldest sequence number previously used in the
reference log to seed the recreated reference.
Change-Id: I11cfff2a96ef962e57f29925a3eef41bdbf9f9bb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/util')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java index 8a21cff73b..763a9f3a47 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java @@ -136,12 +136,13 @@ public class RefMap extends AbstractMap<String, Ref> { * list {@code loose}, if an item appears in both. Items in this * list <b>must</b> also appear in {@code loose}. */ - public RefMap(String prefix, RefList<Ref> packed, RefList<Ref> loose, - RefList<Ref> resolved) { + @SuppressWarnings("unchecked") + public RefMap(String prefix, RefList<? extends Ref> packed, + RefList<? extends Ref> loose, RefList<? extends Ref> resolved) { this.prefix = prefix; - this.packed = packed; - this.loose = loose; - this.resolved = resolved; + this.packed = (RefList<Ref>) packed; + this.loose = (RefList<Ref>) loose; + this.resolved = (RefList<Ref>) resolved; } @Override |