T - The type of entries in this archive.U - The type of directory entries in this archive.public abstract class AbstractArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>> extends Object implements ArchiveEntry<T,U>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractArchiveEntry(org.entityfs.el.AbsoluteLocation loc,
ArchiveEntryCollaborator<T,U> collaborator)
Create a new archive entry.
|
| Modifier and Type | Method and Description |
|---|---|
protected ArchiveEntryCollaborator<T,U> |
getCollaborator() |
org.entityfs.el.AbsoluteLocation |
getLocation()
Get the location of the entry in the archive.
|
String |
getName()
Get the entry's file name.
|
U |
getParent()
Get the parent directory entry for this archive entry.
|
org.entityfs.lock.EntityLock |
getReadLock()
Since archive objects are read only, this method only returns a dummy
lock.
|
boolean |
isReadLockedByCurrentThread()
This method always returns
true. |
org.entityfs.lock.EntityLock |
lockForReading()
Since archive objects are read only, this method only returns a dummy
lock.
|
protected AbstractArchiveEntry(org.entityfs.el.AbsoluteLocation loc,
ArchiveEntryCollaborator<T,U> collaborator)
loc - The entry's location in the archive.collaborator - Collaborator object that gives access to the archive.public org.entityfs.el.AbsoluteLocation getLocation()
ArchiveEntrygetLocation in interface ArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>>protected ArchiveEntryCollaborator<T,U> getCollaborator()
public org.entityfs.lock.EntityLock getReadLock()
getReadLock in interface org.entityfs.lock.ReadLockablepublic boolean isReadLockedByCurrentThread()
throws IllegalStateException
true.isReadLockedByCurrentThread in interface org.entityfs.lock.ReadLockabletrue, always.IllegalStateExceptionpublic org.entityfs.lock.EntityLock lockForReading()
throws org.entityfs.exception.LockTimeoutException
lockForReading in interface org.entityfs.lock.ReadLockableorg.entityfs.exception.LockTimeoutExceptionpublic String getName()
getName in interface org.entityfs.Namedpublic U getParent()
getParent in interface ArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>>null.