Class BundleBinding
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.util.BundleBinding
-
public class BundleBinding extends Object
This Class implements efficient serialization methods for item states.
-
-
Field Summary
Fields Modifier and Type Field Description protected BLOBStore
blobStore
the blob storeprotected DataStore
dataStore
Data store for binary properties.protected ErrorHandling
errorHandling
the error handlingprotected long
minBlobSize
minimum size of binaries to store in blob storeprotected StringIndex
nameIndex
the name indexprotected StringIndex
nsIndex
the namespace index
-
Constructor Summary
Constructors Constructor Description BundleBinding(ErrorHandling errorHandling, BLOBStore blobStore, StringIndex nsIndex, StringIndex nameIndex, DataStore dataStore)
Creates a new bundle binding
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BLOBStore
getBlobStore()
Returns the blob store that is associated with this binding.long
getMinBlobSize()
Returns the minimum blob sizeNodePropBundle
readBundle(InputStream in, NodeId id)
Deserializes aNodePropBundle
from a data input stream.void
setMinBlobSize(long minBlobSize)
Sets the minimum blob size.void
writeBundle(OutputStream out, NodePropBundle bundle)
Serializes aNodePropBundle
to a data output stream
-
-
-
Field Detail
-
nsIndex
protected final StringIndex nsIndex
the namespace index
-
nameIndex
protected final StringIndex nameIndex
the name index
-
blobStore
protected final BLOBStore blobStore
the blob store
-
minBlobSize
protected long minBlobSize
minimum size of binaries to store in blob store
-
errorHandling
protected final ErrorHandling errorHandling
the error handling
-
dataStore
protected final DataStore dataStore
Data store for binary properties.
-
-
Constructor Detail
-
BundleBinding
public BundleBinding(ErrorHandling errorHandling, BLOBStore blobStore, StringIndex nsIndex, StringIndex nameIndex, DataStore dataStore)
Creates a new bundle binding- Parameters:
errorHandling
- the error handlingblobStore
- the blobstore for retrieving blobsnsIndex
- the namespace indexnameIndex
- the name indexdataStore
- the data store
-
-
Method Detail
-
getMinBlobSize
public long getMinBlobSize()
Returns the minimum blob size- Returns:
- the minimum blob size
- See Also:
for details.
-
setMinBlobSize
public void setMinBlobSize(long minBlobSize)
Sets the minimum blob size. Binary values that are shorted than this given size will be inlined in the serialization stream, binary value that are longer, will be stored in the blob store. default is 4k.- Parameters:
minBlobSize
- the minimum blob size.
-
getBlobStore
public BLOBStore getBlobStore()
Returns the blob store that is associated with this binding.- Returns:
- the blob store
-
readBundle
public NodePropBundle readBundle(InputStream in, NodeId id) throws IOException
Deserializes aNodePropBundle
from a data input stream.- Parameters:
in
- the input streamid
- the node id for the new bundle- Returns:
- the bundle
- Throws:
IOException
- if an I/O error occurs.
-
writeBundle
public void writeBundle(OutputStream out, NodePropBundle bundle) throws IOException
Serializes aNodePropBundle
to a data output stream- Parameters:
out
- the output streambundle
- the bundle to serialize- Throws:
IOException
- if an I/O error occurs.
-
-