public class AppendRecord extends AbstractRecord
nsResolver, resolver
Constructor and Description |
---|
AppendRecord(AbstractJournal journal,
String producerId)
Create a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
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()
Unsupported methods when appending.
|
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.
|
String |
readString()
Read a string from the underlying stream.
|
void |
setRevision(long revision)
Set the revision this record represents.
|
long |
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 |
writeString(String s)
Write a string to the underlying stream.
|
readNodeId, readNodeTypeDef, readPath, readPathElement, readPrivilegeDef, readPropertyId, readQName, writeNodeId, writeNodeTypeDef, writePath, writePathElement, writePrivilegeDef, writePropertyId, writeQName
public AppendRecord(AbstractJournal journal, String producerId)
journal
- journal where record is being appendedproducerId
- producer identifierpublic String getJournalId()
public String getProducerId()
public long getRevision()
public void setRevision(long revision)
revision
- revisionpublic void writeByte(int n) throws JournalException
n
- byteJournalException
- if an error occurspublic void writeChar(char c) throws JournalException
c
- characterJournalException
- if an error occurspublic void writeBoolean(boolean b) throws JournalException
b
- booleanJournalException
- if an error occurspublic void writeInt(int n) throws JournalException
n
- integerJournalException
- if an error occurspublic void writeLong(long n) throws JournalException
n
- longJournalException
- if an error occurspublic void writeString(String s) throws JournalException
s
- string, may be null
JournalException
- if an error occurspublic void write(byte[] b) throws JournalException
b
- byte arrayJournalException
- if an error occurspublic long update() throws JournalException
JournalException
- if this record has not been appended,
or if another error occurspublic void cancelUpdate()
public byte readByte() throws JournalException
JournalException
- if an error occurspublic char readChar() throws JournalException
Record
JournalException
- if an error occurspublic boolean readBoolean() throws JournalException
Record
JournalException
- if an error occurspublic int readInt() throws JournalException
Record
JournalException
- if an error occurspublic long readLong() throws JournalException
Record
JournalException
- if an error occurspublic String readString() throws JournalException
Record
null
JournalException
- if an error occurspublic void readFully(byte[] b) throws JournalException
Record
b
- byte arrayJournalException
- if an error occursCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.