Interface Record

    • 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
      • 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
      • 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
      • readPathElement

        Path readPathElement()
                      throws JournalException
        Read a named path element from the underlying stream.
        Returns:
        path element
        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
      • 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
      • 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
      • writePrivilegeDef

        void writePrivilegeDef​(PrivilegeDefinition privilegeDefinition)
                        throws JournalException
        Write a PrivilegeDefinition to the underlying stream.
        Parameters:
        privilegeDefinition - privilege definition
        Throws:
        JournalException - if an error occurs
      • update

        long update()
             throws JournalException
        Update the changes made to an appended record. This will also update this record's revision.
        Returns:
        The update size in bytes.
        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.