|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deckfour.xes.nikefs2.NikeFS2RandomAccessStorageImpl org.deckfour.xes.nikefs2.NikeFS2LazyRandomAccessStorageImpl
public class NikeFS2LazyRandomAccessStorageImpl
Lazy implementation of the random access storage in NikeFS2: Blocks are copied as late as possible (soft copies), while retaining soft links otherwise.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deckfour.xes.nikefs2.NikeFS2RandomAccessStorageImpl |
---|
NikeFS2RandomAccessStorageImpl.FS2BlockInputStream, NikeFS2RandomAccessStorageImpl.FS2BlockOutputStream, NikeFS2RandomAccessStorageImpl.FS2DataInputStream, NikeFS2RandomAccessStorageImpl.FS2DataOutputStream |
Field Summary | |
---|---|
protected boolean |
isSoftCopy
Whether this instance is still a soft copy (i.e., actually empty). |
protected NikeFS2LazyRandomAccessStorageImpl |
parent
Parent storage, containing the original data. |
protected ArrayList<NikeFS2LazyRandomAccessStorageImpl> |
softCopies
Child storages, which are soft copies of this instance. |
Fields inherited from class org.deckfour.xes.nikefs2.NikeFS2RandomAccessStorageImpl |
---|
blocks, dataInputStream, dataOutputStream, pointer, size, vfs |
Constructor Summary | |
---|---|
NikeFS2LazyRandomAccessStorageImpl(NikeFS2LazyRandomAccessStorageImpl template)
Creates a new instance. |
|
NikeFS2LazyRandomAccessStorageImpl(NikeFS2VirtualFileSystem virtualFileSystem)
Creates a new instance. |
Method Summary | |
---|---|
void |
alertSoftCopies()
This method alerts all child soft copies of this storage to consolidate; called prior to modification of this instance. |
void |
close()
Closes the data storage container. |
void |
consolidateSoftCopy()
Consolidates this soft copy prior to modification. |
NikeFS2RandomAccessStorage |
copy()
Creates a clone, or copy, of this storage, having the exact same contents and the file pointer reset to zero. |
void |
deregisterSoftCopy(NikeFS2LazyRandomAccessStorageImpl copycat)
This method is used by child copies to deregister with their parent. |
protected void |
finalize()
|
void |
registerSoftCopy(NikeFS2LazyRandomAccessStorageImpl copycat)
This method is used by child copies to register with their parent. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
void |
writeBoolean(boolean v)
|
void |
writeByte(int b)
|
void |
writeBytes(String str)
|
void |
writeChar(int c)
|
void |
writeChars(String str)
|
void |
writeDouble(double d)
|
void |
writeFloat(float f)
|
void |
writeInt(int i)
|
void |
writeLong(long l)
|
void |
writeShort(int s)
|
void |
writeUTF(String str)
|
Methods inherited from class org.deckfour.xes.nikefs2.NikeFS2RandomAccessStorageImpl |
---|
adjustSize, getFilePointer, length, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, skipBytes, translateToBlockNumber, translateToBlockOffset |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected NikeFS2LazyRandomAccessStorageImpl parent
protected boolean isSoftCopy
protected ArrayList<NikeFS2LazyRandomAccessStorageImpl> softCopies
Constructor Detail |
---|
public NikeFS2LazyRandomAccessStorageImpl(NikeFS2VirtualFileSystem virtualFileSystem)
virtualFileSystem
- Virtual file system to store data to.public NikeFS2LazyRandomAccessStorageImpl(NikeFS2LazyRandomAccessStorageImpl template)
template
- Storage of which this instance is a soft copy.Method Detail |
---|
public void registerSoftCopy(NikeFS2LazyRandomAccessStorageImpl copycat)
copycat
- The child soft copy to register.public void deregisterSoftCopy(NikeFS2LazyRandomAccessStorageImpl copycat)
copycat
- The child soft copy to deregister.public void alertSoftCopies() throws IOException
IOException
public void consolidateSoftCopy() throws IOException
IOException
public void close() throws IOException
NikeFS2RandomAccessStorage
close
in interface NikeFS2RandomAccessStorage
close
in class NikeFS2RandomAccessStorageImpl
IOException
public NikeFS2RandomAccessStorage copy() throws IOException
NikeFS2RandomAccessStorage
copy
in interface NikeFS2RandomAccessStorage
copy
in class NikeFS2RandomAccessStorageImpl
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in interface DataOutput
write
in class NikeFS2RandomAccessStorageImpl
IOException
public void write(byte[] b) throws IOException
write
in interface DataOutput
write
in class NikeFS2RandomAccessStorageImpl
IOException
public void write(int b) throws IOException
write
in interface DataOutput
write
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeBoolean(boolean v) throws IOException
writeBoolean
in interface DataOutput
writeBoolean
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeByte(int b) throws IOException
writeByte
in interface DataOutput
writeByte
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeBytes(String str) throws IOException
writeBytes
in interface DataOutput
writeBytes
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeChar(int c) throws IOException
writeChar
in interface DataOutput
writeChar
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeChars(String str) throws IOException
writeChars
in interface DataOutput
writeChars
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeDouble(double d) throws IOException
writeDouble
in interface DataOutput
writeDouble
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeFloat(float f) throws IOException
writeFloat
in interface DataOutput
writeFloat
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeInt(int i) throws IOException
writeInt
in interface DataOutput
writeInt
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeLong(long l) throws IOException
writeLong
in interface DataOutput
writeLong
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeShort(int s) throws IOException
writeShort
in interface DataOutput
writeShort
in class NikeFS2RandomAccessStorageImpl
IOException
public void writeUTF(String str) throws IOException
writeUTF
in interface DataOutput
writeUTF
in class NikeFS2RandomAccessStorageImpl
IOException
protected void finalize() throws Throwable
finalize
in class Object
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |