|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.storage.dht.spi.memory.MemoryDatabase
public class MemoryDatabase
Stores Git repositories in non-persistent JVM heap memory.
This database type is only suitable for unit testing, and other toy applications. All chunk data is held within the JVM heap as byte arrays, which is not the most efficient representation available.
Constructor Summary | |
---|---|
MemoryDatabase()
Initialize an empty database. |
Method Summary | |
---|---|
ChunkTable |
chunk()
|
WriteBuffer |
newWriteBuffer()
Create a new WriteBuffer for the current thread. |
ObjectIndexTable |
objectIndex()
|
DhtRepository |
open(java.lang.String name)
Open a repository by name on this database. |
RefTable |
ref()
|
RepositoryTable |
repository()
|
RepositoryIndexTable |
repositoryIndex()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryDatabase()
Method Detail |
---|
public DhtRepository open(java.lang.String name) throws java.io.IOException
name
- the name of the repository.
Repository.create(boolean)
to create.
java.io.IOException
public RepositoryIndexTable repositoryIndex()
repositoryIndex
in interface Database
public RepositoryTable repository()
repository
in interface Database
public RefTable ref()
ref
in interface Database
public ObjectIndexTable objectIndex()
objectIndex
in interface Database
public ChunkTable chunk()
chunk
in interface Database
public WriteBuffer newWriteBuffer()
Database
Unlike other methods on this interface, the returned buffer must be a new object on every invocation. Buffers do not need to be thread-safe.
newWriteBuffer
in interface Database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |