public static class DfsRefDatabase.RefCache extends Object
Constructor and Description |
---|
RefCache(RefList<Ref> ids,
RefList<Ref> sym)
Initialize a new reference cache.
|
Modifier and Type | Method and Description |
---|---|
Ref |
get(String name)
Find a reference by name.
|
DfsRefDatabase.RefCache |
put(Ref ref)
Obtain a modified copy of the cache with a ref stored.
|
DfsRefDatabase.RefCache |
remove(String refName)
Obtain a modified copy of the cache with the ref removed.
|
int |
size() |
public RefCache(RefList<Ref> ids, RefList<Ref> sym)
The two reference lists supplied must be sorted in correct order (string compare order) by name.
ids
- references that carry an ObjectId, and all of sym
.sym
- references that are symbolic references to others.public int size()
public Ref get(String name)
name
- full name of the reference.public DfsRefDatabase.RefCache put(Ref ref)
This cache instance is not modified by this method.
ref
- reference to add or replace.public DfsRefDatabase.RefCache remove(String refName)
This cache instance is not modified by this method.
refName
- reference to remove, if it exists.Copyright © 2018 Eclipse JGit Project. All rights reserved.