| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
blockBytes |
protected org.agilewiki.jid.ReadableBytes |
rb |
protected byte[] |
rootJidBytes |
| Constructor and Description |
|---|
LBlock() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCurrentPosition()
Returns the file position.
|
String |
getFileName()
Returns the file name.
|
org.agilewiki.jid.scalar.vlens.actor.RootJid |
getRootJid()
Get an existing RootJid.
|
org.agilewiki.jid.scalar.vlens.actor.RootJid |
getRootJid(org.agilewiki.jactor.Mailbox mailbox,
org.agilewiki.jactor.Actor parent)
Return the RootJid, deserializing it as needed..
|
long |
getTimestamp()
Returns the timestamp.
|
int |
headerLength()
The length of the header which prefaces the actual data on disk.
|
boolean |
isEmpty()
Indicates the abscense of a root jic.
|
protected void |
saveHeader(org.agilewiki.jid.AppendableBytes ab,
int l)
Provides the raw header information to be written to disk.
|
byte[] |
serialize()
Serializes the header and the assigned RootJid.
|
void |
setCurrentPosition(long position)
Assigns the files current position.
|
void |
setFileName(String fileName)
Assigns the file's name.
|
int |
setHeaderBytes(byte[] bytes)
Provides the raw header information read from disk.
|
void |
setRootJid(org.agilewiki.jid.scalar.vlens.actor.RootJid rootJid)
Reset the block and assign the RootJid.
|
boolean |
setRootJidBytes(byte[] rootJidBytes)
Provides the data read from disk after the header.
|
void |
setTimestamp(long timestamp)
Assigns the timestamp.
|
protected org.agilewiki.jid.ReadableBytes rb
protected byte[] blockBytes
protected byte[] rootJidBytes
public void setRootJid(org.agilewiki.jid.scalar.vlens.actor.RootJid rootJid)
setRootJid in interface BlockrootJid - The RootJid to be assigned.public byte[] serialize()
throws Exception
protected void saveHeader(org.agilewiki.jid.AppendableBytes ab,
int l)
throws Exception
ab - Append the data to this.l - The length of the data.Exceptionpublic int headerLength()
headerLength in interface Blockpublic String getFileName()
getFileName in interface Blockpublic void setFileName(String fileName)
setFileName in interface Blockpublic long getCurrentPosition()
getCurrentPosition in interface Blockpublic void setCurrentPosition(long position)
setCurrentPosition in interface Blockpublic int setHeaderBytes(byte[] bytes)
setHeaderBytes in interface Blockbytes - The header bytes read from disk.public boolean setRootJidBytes(byte[] rootJidBytes)
setRootJidBytes in interface BlockrootJidBytes - The data following the header on disk.public org.agilewiki.jid.scalar.vlens.actor.RootJid getRootJid()
throws Exception
getRootJid in interface BlockException - An exception is thrown when there is no RootJid.public org.agilewiki.jid.scalar.vlens.actor.RootJid getRootJid(org.agilewiki.jactor.Mailbox mailbox,
org.agilewiki.jactor.Actor parent)
throws Exception
getRootJid in interface Blockmailbox - The mailbox.parent - The parent.Exceptionpublic boolean isEmpty()
public long getTimestamp()
getTimestamp in interface Blockpublic void setTimestamp(long timestamp)
setTimestamp in interface Blocktimestamp - The timestamp.Copyright © 2013. All Rights Reserved.