org.apache.jackrabbit.mk.blobs
Class MongoBlobStore

java.lang.Object
  extended by org.apache.jackrabbit.mk.blobs.AbstractBlobStore
      extended by org.apache.jackrabbit.mk.blobs.MongoBlobStore
All Implemented Interfaces:
Closeable, BlobStore, Cache.Backend<AbstractBlobStore.BlockId,AbstractBlobStore.Data>

public class MongoBlobStore
extends AbstractBlobStore

A blob store that uses MongoDB.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.jackrabbit.mk.blobs.AbstractBlobStore
AbstractBlobStore.BlockId, AbstractBlobStore.Data
 
Field Summary
 
Fields inherited from class org.apache.jackrabbit.mk.blobs.AbstractBlobStore
HASH_ALGORITHM, inUse, TYPE_DATA, TYPE_HASH, TYPE_HASH_COMPRESSED
 
Constructor Summary
MongoBlobStore()
           
 
Method Summary
 void close()
           
protected  boolean isMarkEnabled()
           
protected  void mark(AbstractBlobStore.BlockId id)
           
protected  byte[] readBlockFromBackend(AbstractBlobStore.BlockId id)
           
 void startMark()
           
protected  void storeBlock(byte[] digest, int level, byte[] data)
           
 int sweep()
           
 
Methods inherited from class org.apache.jackrabbit.mk.blobs.AbstractBlobStore
addBlob, clearCache, clearInUse, getBlobLength, getBlockSize, getBlockSizeMin, load, mark, markInUse, readBlob, setBlockSize, setBlockSizeMin, usesBlobId, writeBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoBlobStore

public MongoBlobStore()
               throws IOException
Throws:
IOException
Method Detail

readBlockFromBackend

protected byte[] readBlockFromBackend(AbstractBlobStore.BlockId id)
Specified by:
readBlockFromBackend in class AbstractBlobStore

storeBlock

protected void storeBlock(byte[] digest,
                          int level,
                          byte[] data)
Specified by:
storeBlock in class AbstractBlobStore

close

public void close()
Specified by:
close in interface Closeable
Specified by:
close in interface BlobStore
Overrides:
close in class AbstractBlobStore

startMark

public void startMark()
               throws Exception
Specified by:
startMark in class AbstractBlobStore
Throws:
Exception

isMarkEnabled

protected boolean isMarkEnabled()
Specified by:
isMarkEnabled in class AbstractBlobStore

mark

protected void mark(AbstractBlobStore.BlockId id)
             throws Exception
Specified by:
mark in class AbstractBlobStore
Throws:
Exception

sweep

public int sweep()
          throws Exception
Specified by:
sweep in class AbstractBlobStore
Throws:
Exception


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.