|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectbr.com.objectos.git.GitEngine
public final class GitEngine
A state machine providing git operations.
| Nested Class Summary | |
|---|---|
static class |
GitEngine.Option
A GitEngine configuration option. |
| Method Summary | |
|---|---|
static GitEngine.Option |
bufferSize(int size)
Returns an option that sets the buffer size to the specified value. |
GitJob<Repository> |
copy(Repository source,
ObjectId sourceId,
Repository target,
RefName targetRef,
Copy copy)
Copies a commit from a source repository to a target repository. |
static GitEngine |
create(IoWorker ioWorker,
GitEngine.Option... options)
Creates and returns a new git engine instance. |
static GitEngine.Option |
logger(br.com.objectos.core.logging.Logger logger)
Returns an options that sets the logger instance to the specified value. |
GitJob<Directory> |
materialize(Repository repository,
ObjectId objectId,
Directory target)
|
GitJob<Repository> |
openRepository(Directory directory)
|
GitJob<Commit> |
readCommit(Repository repository,
ObjectId id)
Returns a new job that reads a commit object from the specified repository having the specified hash value. |
GitJob<Tree> |
readTree(Repository repository,
ObjectId id)
Returns a new job that reads a tree object from the specified repository having the specified hash value. |
GitJob<MaybeObjectId> |
resolve(Repository repository,
RefName ref)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static GitEngine.Option bufferSize(int size)
size - the buffer size
IllegalArgumentException - if size < 16
public static GitEngine create(IoWorker ioWorker,
GitEngine.Option... options)
Options are provided by static methods in this class. The available
options are:
| Method name | Description | Default value |
|---|---|---|
bufferSize |
The size in bytes of the buffers used by this engine | 4096 |
logger |
The logger instance the GitEngine will use |
NoopLogger.getInstance() |
ioWorker - the worker for I/O tasksoptions - additional configuration options
public static GitEngine.Option logger(br.com.objectos.core.logging.Logger logger)
logger - the logger instance
public final GitJob<Repository> copy(Repository source,
ObjectId sourceId,
Repository target,
RefName targetRef,
Copy copy)
public final GitJob<Directory> materialize(Repository repository,
ObjectId objectId,
Directory target)
public final GitJob<Repository> openRepository(Directory directory)
public final GitJob<Commit> readCommit(Repository repository,
ObjectId id)
The returned job will fail if an object with the specified hash cannot be found, if an object with the specified hash exists but is not a commit object or if there is a parse error.
repository - the git repository from which to read the commitid - the unique hash value of the commit to read
public final GitJob<Tree> readTree(Repository repository,
ObjectId id)
The returned job will fail if an object with the specified hash cannot be found, if an object with the specified hash exists but is not a tree object or if there is a parse error.
repository - the git repository from which to read the treeid - the unique hash value of the tree to read
public final GitJob<MaybeObjectId> resolve(Repository repository,
RefName ref)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||