|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.at4j.archive.AbstractArchiveEntry<T,U>
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>>
Abstract base class for archive entry implementations.
Constructor Summary | |
---|---|
protected |
AbstractArchiveEntry(AbsoluteLocation loc,
ArchiveEntryCollaborator<T,U> collaborator)
Create a new archive entry. |
Method Summary | |
---|---|
protected ArchiveEntryCollaborator<T,U> |
getCollaborator()
|
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. |
EntityLock |
getReadLock()
Since archive objects are read only, this method only returns a dummy lock. |
boolean |
isReadLockedByCurrentThread()
This method always returns true . |
EntityLock |
lockForReading()
Since archive objects are read only, this method only returns a dummy lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractArchiveEntry(AbsoluteLocation loc, ArchiveEntryCollaborator<T,U> collaborator)
loc
- The entry's location in the archive.collaborator
- Collaborator object that gives access to the archive.Method Detail |
---|
public AbsoluteLocation getLocation()
ArchiveEntry
getLocation
in interface ArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>>
protected ArchiveEntryCollaborator<T,U> getCollaborator()
public EntityLock getReadLock()
getReadLock
in interface ReadLockable
public boolean isReadLockedByCurrentThread() throws IllegalStateException
true
.
isReadLockedByCurrentThread
in interface ReadLockable
true
, always.
IllegalStateException
- If this is called on a disconnected entity
view.public EntityLock lockForReading() throws LockTimeoutException
lockForReading
in interface ReadLockable
LockTimeoutException
- If the lock acquiring timed out. (It is up
to the LockAcquiringStrategy
to decide if lock acquiring can time
out.)public String getName()
getName
in interface Named
public U getParent()
getParent
in interface ArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>>
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |