org.apache.jackrabbit.core.journal
Interface Record

All Known Implementing Classes:
AbstractRecord, AppendRecord, ReadRecord

public interface Record

Record interface.


Method Summary
 void cancelUpdate()
          Cancel the changes made to an appended record.
 String getJournalId()
          Return this record's journal identifier.
 String getProducerId()
          Return this record's producer identifier.
 long getRevision()
          Returns the revision this record represents.
 boolean readBoolean()
          Read a boolean from the underlying stream.
 byte readByte()
          Read a byte from the underlying stream.
 char readChar()
          Read a character from the underlying stream.
 void readFully(byte[] b)
          Fully read an array of bytes from the underlying stream.
 int readInt()
          Read an integer from the underlying stream.
 long readLong()
          Read a long from the underlying stream.
 NodeId readNodeId()
          Read a NodeId from the underlying stream.
 QNodeTypeDefinition readNodeTypeDef()
          Read a NodeTypeDef from the underlying stream.
 Path readPath()
          Read a Path from the underlying stream.
 Path readPathElement()
          Read a named path element from the underlying stream.
 PropertyId readPropertyId()
          Read a PropertyId from the underlying stream.
 Name readQName()
          Read a Name frmo the underlying stream.
 String readString()
          Read a string from the underlying stream.
 void update()
          Update the changes made to an appended record.
 void write(byte[] b)
          Write an array of bytes to the underlying stream.
 void writeBoolean(boolean b)
          Write a boolean from the underlying stream.
 void writeByte(int n)
          Write a byte to the underlying stream.
 void writeChar(char c)
          Write a character to the underlying stream.
 void writeInt(int n)
          Write an integer to the underlying stream.
 void writeLong(long n)
          Write a long to the underlying stream.
 void writeNodeId(NodeId nodeId)
          Write a NodeId to the underlying stream.
 void writeNodeTypeDef(QNodeTypeDefinition ntd)
          Write a NodeTypeDef to the underlying stream.
 void writePath(Path path)
          Write a Path to the underlying stream.
 void writePathElement(Path element)
          Write a Path.Element to the underlying stream.
 void writePropertyId(PropertyId propertyId)
          Write a PropertyId to the underlying stream.
 void writeQName(Name name)
          Write a Name to the underlying stream.
 void writeString(String s)
          Write a string to the underlying stream.
 

Method Detail

getRevision

long getRevision()
Returns the revision this record represents.

Returns:
revision

getJournalId

String getJournalId()
Return this record's journal identifier.

Returns:
journal identifier

getProducerId

String getProducerId()
Return this record's producer identifier.

Returns:
producer identifier

readByte

byte readByte()
              throws JournalException
Read a byte from the underlying stream.

Returns:
byte
Throws:
JournalException - if an error occurs

readChar

char readChar()
              throws JournalException
Read a character from the underlying stream.

Returns:
character
Throws:
JournalException - if an error occurs

readBoolean

boolean readBoolean()
                    throws JournalException
Read a boolean from the underlying stream.

Returns:
boolean
Throws:
JournalException - if an error occurs

readInt

int readInt()
            throws JournalException
Read an integer from the underlying stream.

Returns:
integer
Throws:
JournalException - if an error occurs

readLong

long readLong()
              throws JournalException
Read a long from the underlying stream.

Returns:
long value.
Throws:
JournalException - if an error occurs

readString

String readString()
                  throws JournalException
Read a string from the underlying stream.

Returns:
string or null
Throws:
JournalException - if an error occurs

readFully

void readFully(byte[] b)
               throws JournalException
Fully read an array of bytes from the underlying stream.

Parameters:
b - byte array
Throws:
JournalException - if an error occurs

readQName

Name readQName()
               throws JournalException
Read a Name frmo the underlying stream.

Returns:
name name
Throws:
JournalException - if an error occurs

readPathElement

Path readPathElement()
                     throws JournalException
Read a named path element from the underlying stream.

Returns:
path element
Throws:
JournalException - if an error occurs

readPath

Path readPath()
              throws JournalException
Read a Path from the underlying stream.

Returns:
path
Throws:
JournalException - if an error occurs

readNodeId

NodeId readNodeId()
                  throws JournalException
Read a NodeId from the underlying stream.

Returns:
node id
Throws:
JournalException - if an error occurs

readPropertyId

PropertyId readPropertyId()
                          throws JournalException
Read a PropertyId from the underlying stream.

Returns:
property id
Throws:
JournalException - if an error occurs

readNodeTypeDef

QNodeTypeDefinition readNodeTypeDef()
                                    throws JournalException
Read a NodeTypeDef from the underlying stream.

Returns:
node type definition
Throws:
JournalException - if an error occurs

writeByte

void writeByte(int n)
               throws JournalException
Write a byte to the underlying stream.

Parameters:
n - byte
Throws:
JournalException - if an error occurs

writeChar

void writeChar(char c)
               throws JournalException
Write a character to the underlying stream.

Parameters:
c - character
Throws:
JournalException - if an error occurs

writeBoolean

void writeBoolean(boolean b)
                  throws JournalException
Write a boolean from the underlying stream.

Parameters:
b - boolean
Throws:
JournalException - if an error occurs

writeInt

void writeInt(int n)
              throws JournalException
Write an integer to the underlying stream.

Parameters:
n - integer
Throws:
JournalException - if an error occurs

writeLong

void writeLong(long n)
               throws JournalException
Write a long to the underlying stream.

Parameters:
n - long
Throws:
JournalException - if an error occurs

writeString

void writeString(String s)
                 throws JournalException
Write a string to the underlying stream.

Parameters:
s - string, may be null
Throws:
JournalException - if an error occurs

write

void write(byte[] b)
           throws JournalException
Write an array of bytes to the underlying stream.

Parameters:
b - byte array
Throws:
JournalException - if an error occurs

writeQName

void writeQName(Name name)
                throws JournalException
Write a Name to the underlying stream.

Parameters:
name - name
Throws:
JournalException - if an error occurs

writePathElement

void writePathElement(Path element)
                      throws JournalException
Write a Path.Element to the underlying stream.

Parameters:
element - path element
Throws:
JournalException - if an error occurs

writePath

void writePath(Path path)
               throws JournalException
Write a Path to the underlying stream.

Parameters:
path - path
Throws:
JournalException - if an error occurs

writeNodeId

void writeNodeId(NodeId nodeId)
                 throws JournalException
Write a NodeId to the underlying stream.

Parameters:
nodeId - node id
Throws:
JournalException - if an error occurs

writePropertyId

void writePropertyId(PropertyId propertyId)
                     throws JournalException
Write a PropertyId to the underlying stream.

Parameters:
propertyId - property id
Throws:
JournalException - if an error occurs

writeNodeTypeDef

void writeNodeTypeDef(QNodeTypeDefinition ntd)
                      throws JournalException
Write a NodeTypeDef to the underlying stream.

Parameters:
ntd - node type definition
Throws:
JournalException - if an error occurs

update

void update()
            throws JournalException
Update the changes made to an appended record. This will also update this record's revision.

Throws:
JournalException - if this record has not been appended, or if another error occurs

cancelUpdate

void cancelUpdate()
Cancel the changes made to an appended record.



Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.