Class InMemoryRepository

  extended by org.eclipse.jgit.lib.Repository
      extended by
          extended by

public class InMemoryRepository
extends DfsRepository

Git repository stored entirely in the local process memory.

This implementation builds on the DFS repository by storing all reference and object data in the local process. It is not very efficient and exists only for unit testing and small experiments.

The repository is thread-safe. Memory used is released only when this object is garbage collected. Closing the repository has no impact on its memory.

Constructor Summary
InMemoryRepository(DfsRepositoryDescription repoDesc)
          Initialize a new in-memory repository.
Method Summary
 DfsObjDatabase getObjectDatabase()
 DfsRefDatabase getRefDatabase()
Methods inherited from class
create, exists, getConfig, getDescription, getReflogReader, notifyIndexChanged, scanForRepoChanges
Methods inherited from class org.eclipse.jgit.lib.Repository
close, create, doClose, fireEvent, getAdditionalHaves, getAllRefs, getAllRefsByPeeledObjectId, getBranch, getDirectory, getFS, getFullBranch, getGlobalListenerList, getIndexFile, getListenerList, getRef, getRepositoryState, getTags, getWorkTree, hasObject, incrementOpen, isBare, isValidRefName, lockDirCache, newObjectInserter, newObjectReader, open, open, peel, readCherryPickHead, readDirCache, readMergeCommitMsg, readMergeHeads, readOrigHead, readRevertHead, readSquashCommitMsg, renameRef, resolve, shortenRefName, simplify, stripWorkDir, toString, updateRef, updateRef, writeCherryPickHead, writeMergeCommitMsg, writeMergeHeads, writeOrigHead, writeRevertHead, writeSquashCommitMsg
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public InMemoryRepository(DfsRepositoryDescription repoDesc)
Initialize a new in-memory repository.

repoDesc - description of the repository.
Method Detail


public DfsObjDatabase getObjectDatabase()
Specified by:
getObjectDatabase in class DfsRepository
the object database which stores this repository's data.


public DfsRefDatabase getRefDatabase()
Specified by:
getRefDatabase in class DfsRepository
the reference database which stores the reference namespace.

Copyright © 2013. All Rights Reserved.