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 BLOBStoreblobStorethe blob storeprotected DataStoredataStoreData store for binary properties.protected ErrorHandlingerrorHandlingthe error handlingprotected longminBlobSizeminimum size of binaries to store in blob storeprotected StringIndexnameIndexthe name indexprotected StringIndexnsIndexthe 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 BLOBStoregetBlobStore()Returns the blob store that is associated with this binding.longgetMinBlobSize()Returns the minimum blob sizeNodePropBundlereadBundle(InputStream in, NodeId id)Deserializes aNodePropBundlefrom a data input stream.voidsetMinBlobSize(long minBlobSize)Sets the minimum blob size.voidwriteBundle(OutputStream out, NodePropBundle bundle)Serializes aNodePropBundleto 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 aNodePropBundlefrom 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 aNodePropBundleto a data output stream- Parameters:
out- the output streambundle- the bundle to serialize- Throws:
IOException- if an I/O error occurs.
-
-