Class InMemoryDataRecord
java.lang.Object
org.apache.jackrabbit.oak.plugins.blob.datastore.InMemoryDataRecord
- All Implemented Interfaces:
DataRecord
Represents binary data which is backed by a byte[] (in memory).
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the identifier of this record.static InMemoryDataRecordgetInstance(String id) Convert a String to an instance of this class.longReturns the last modified of the record.longReturns the length of the binary stream in this record.Returns a secure reference to this binary, ornullif no such reference is available.Returns the the binary stream in this record.inthashCode()Returns zero to satisfy the Object equals/hashCode contract.static booleanisInstance(String id) Checks if String can be converted to an instance of this class.toString()
-
Method Details
-
isInstance
Checks if String can be converted to an instance of this class.- Parameters:
id- DataRecord identifier- Returns:
- true if it can be converted
-
getInstance
Convert a String to an instance of this class.- Parameters:
id- DataRecord identifier- Returns:
- the instance
- Throws:
IllegalArgumentException
-
getIdentifier
Description copied from interface:DataRecordReturns the identifier of this record.- Specified by:
getIdentifierin interfaceDataRecord- Returns:
- data identifier
-
getReference
Description copied from interface:DataRecordReturns a secure reference to this binary, ornullif no such reference is available.- Specified by:
getReferencein interfaceDataRecord- Returns:
- binary reference, or
null
-
getLength
Description copied from interface:DataRecordReturns the length of the binary stream in this record.- Specified by:
getLengthin interfaceDataRecord- Returns:
- length of the binary stream
- Throws:
DataStoreException- if the record could not be accessed
-
getStream
Description copied from interface:DataRecordReturns the the binary stream in this record.- Specified by:
getStreamin interfaceDataRecord- Returns:
- binary stream
-
getLastModified
public long getLastModified()Description copied from interface:DataRecordReturns the last modified of the record.- Specified by:
getLastModifiedin interfaceDataRecord- Returns:
- last modified time of the binary stream
-
toString
-
equals
-
hashCode
public int hashCode()Returns zero to satisfy the Object equals/hashCode contract. This class is mutable and not meant to be used as a hash key.
-