|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 NikeFS2RandomAccessStorageclose in class NikeFS2RandomAccessStorageImplIOException
public NikeFS2RandomAccessStorage copy()
throws IOException
NikeFS2RandomAccessStorage
copy in interface NikeFS2RandomAccessStoragecopy in class NikeFS2RandomAccessStorageImplIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputwrite in class NikeFS2RandomAccessStorageImplIOException
public void write(byte[] b)
throws IOException
write in interface DataOutputwrite in class NikeFS2RandomAccessStorageImplIOException
public void write(int b)
throws IOException
write in interface DataOutputwrite in class NikeFS2RandomAccessStorageImplIOException
public void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputwriteBoolean in class NikeFS2RandomAccessStorageImplIOException
public void writeByte(int b)
throws IOException
writeByte in interface DataOutputwriteByte in class NikeFS2RandomAccessStorageImplIOException
public void writeBytes(String str)
throws IOException
writeBytes in interface DataOutputwriteBytes in class NikeFS2RandomAccessStorageImplIOException
public void writeChar(int c)
throws IOException
writeChar in interface DataOutputwriteChar in class NikeFS2RandomAccessStorageImplIOException
public void writeChars(String str)
throws IOException
writeChars in interface DataOutputwriteChars in class NikeFS2RandomAccessStorageImplIOException
public void writeDouble(double d)
throws IOException
writeDouble in interface DataOutputwriteDouble in class NikeFS2RandomAccessStorageImplIOException
public void writeFloat(float f)
throws IOException
writeFloat in interface DataOutputwriteFloat in class NikeFS2RandomAccessStorageImplIOException
public void writeInt(int i)
throws IOException
writeInt in interface DataOutputwriteInt in class NikeFS2RandomAccessStorageImplIOException
public void writeLong(long l)
throws IOException
writeLong in interface DataOutputwriteLong in class NikeFS2RandomAccessStorageImplIOException
public void writeShort(int s)
throws IOException
writeShort in interface DataOutputwriteShort in class NikeFS2RandomAccessStorageImplIOException
public void writeUTF(String str)
throws IOException
writeUTF in interface DataOutputwriteUTF in class NikeFS2RandomAccessStorageImplIOException
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||