org.eclipse.jgit.storage.dfs
Class DfsRepository

java.lang.Object
  extended by org.eclipse.jgit.lib.Repository
      extended by org.eclipse.jgit.storage.dfs.DfsRepository
Direct Known Subclasses:
InMemoryRepository

public abstract class DfsRepository
extends Repository

A Git repository on a DFS.


Constructor Summary
protected DfsRepository(DfsRepositoryBuilder builder)
          Initialize a DFS repository.
 
Method Summary
 void create(boolean bare)
          Create a new Git repository initializing the necessary files and directories.
 boolean exists()
          Check if the repository already exists.
 StoredConfig getConfig()
           
 DfsRepositoryDescription getDescription()
           
abstract  DfsObjDatabase getObjectDatabase()
           
abstract  DfsRefDatabase getRefDatabase()
           
 ReflogReader getReflogReader(String refName)
           
 void notifyIndexChanged()
          Notify that the index changed
 void scanForRepoChanges()
          Force a scan for changed refs.
 
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, renameRef, resolve, shortenRefName, stripWorkDir, toString, updateRef, updateRef, writeCherryPickHead, writeMergeCommitMsg, writeMergeHeads, writeOrigHead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DfsRepository

protected DfsRepository(DfsRepositoryBuilder builder)
Initialize a DFS repository.

Parameters:
builder - description of the repository.
Method Detail

getObjectDatabase

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

getRefDatabase

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

getDescription

public DfsRepositoryDescription getDescription()
Returns:
a description of this repository.

exists

public boolean exists()
               throws IOException
Check if the repository already exists.

Returns:
true if the repository exists; false if it is new.
Throws:
IOException - the repository cannot be checked.

create

public void create(boolean bare)
            throws IOException
Description copied from class: Repository
Create a new Git repository initializing the necessary files and directories.

Specified by:
create in class Repository
Parameters:
bare - if true, a bare repository (a repository without a working directory) is created.
Throws:
IOException - in case of IO problem

getConfig

public StoredConfig getConfig()
Specified by:
getConfig in class Repository
Returns:
the configuration of this repository

scanForRepoChanges

public void scanForRepoChanges()
                        throws IOException
Description copied from class: Repository
Force a scan for changed refs.

Specified by:
scanForRepoChanges in class Repository
Throws:
IOException

notifyIndexChanged

public void notifyIndexChanged()
Description copied from class: Repository
Notify that the index changed

Specified by:
notifyIndexChanged in class Repository

getReflogReader

public ReflogReader getReflogReader(String refName)
                             throws IOException
Specified by:
getReflogReader in class Repository
Returns:
a ReflogReader for the supplied refname, or null if the named ref does not exist.
Throws:
IOException - the ref could not be accessed.


Copyright © 2012. All Rights Reserved.