public class FileTreeIteratorWithTimeControl extends FileTreeIterator
FileTreeIterator
used in tests which allows to specify explicitly
what will be returned by getEntryLastModified()
. This allows to
write tests where certain files have to have the same modification time.
This iterator is configured by a list of strictly increasing long values t(0), t(1), ..., t(n). For each file with a modification between t(x) and t(x+1) [ t(x) <= time < t(x+1) ] this iterator will report t(x). For files with a modification time smaller t(0) a modification time of 0 is returned. For files with a modification time greater or equal t(n) t(n) will be returned.
This class was written especially to test racy-git problems
FileTreeIterator.FileEntry
WorkingTreeIterator.Entry, WorkingTreeIterator.MetadataDiff
directory, fs
EOF, repository
DEFAULT_PATH_SIZE, mode, path, pathLen, pathOffset, zeroid
Constructor and Description |
---|
FileTreeIteratorWithTimeControl(File f,
FS fs,
TreeSet<Long> modTimes) |
FileTreeIteratorWithTimeControl(FileTreeIterator p,
File f,
FS fs,
TreeSet<Long> modTimes) |
FileTreeIteratorWithTimeControl(FileTreeIterator p,
Repository repo,
TreeSet<Long> modTimes) |
FileTreeIteratorWithTimeControl(Repository repo,
TreeSet<Long> modTimes) |
Modifier and Type | Method and Description |
---|---|
AbstractTreeIterator |
createSubtreeIterator(ObjectReader reader) |
long |
getEntryLastModified() |
getDirectory, getEntryFile, idSubmodule
back, compareMetadata, current, eof, first, getEntryAttributesNode, getEntryContentLength, getEntryLength, getGlobalAttributesNode, getIndexFileMode, getInfoAttributesNode, getOptions, hasId, idBuffer, idOffset, idSubmodule, init, initRootIterator, isEntryIgnored, isEntryIgnored, isModeDifferent, isModified, next, openEntryStream, reset, setDirCacheIterator
createEmptyTreeIterator, createSubtreeIterator, ensurePathCapacity, getEntryFileMode, getEntryObjectId, getEntryObjectId, getEntryPathBuffer, getEntryPathHashCode, getEntryPathLength, getEntryPathString, getEntryRawMode, getName, getNameLength, getNameOffset, growPath, idEqual, pathCompare, pathCompare, skip, stopWalk, toString
public FileTreeIteratorWithTimeControl(FileTreeIterator p, Repository repo, TreeSet<Long> modTimes)
public FileTreeIteratorWithTimeControl(FileTreeIterator p, File f, FS fs, TreeSet<Long> modTimes)
public FileTreeIteratorWithTimeControl(Repository repo, TreeSet<Long> modTimes)
public AbstractTreeIterator createSubtreeIterator(ObjectReader reader)
createSubtreeIterator
in class FileTreeIterator
public long getEntryLastModified()
getEntryLastModified
in class WorkingTreeIterator
Copyright © 2015 Eclipse JGit Project. All rights reserved.