org.w3c.tools.resources
Class DummyResourceReference
java.lang.Object
|
+--org.w3c.tools.resources.DummyResourceReference
- public class DummyResourceReference
- extends java.lang.Object
- implements ResourceReference
This class implements the ResourceReference interface. For external
use only. The ResourceStoreManager has its own Reference class.
Field Summary |
protected int |
lockCount
The lock count associated to the reference. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
lockCount
protected int lockCount
- The lock count associated to the reference.
DummyResourceReference
public DummyResourceReference(Resource resource)
- Parameters:
resource
- The resource to reference.
updateContext
public void updateContext(ResourceContext ctxt)
- update the cached context of that reference.
- Specified by:
- updateContext in interface ResourceReference
- Parameters:
ctxt
- the new ResourceContext.
lock
public Resource lock()
throws InvalidResourceException
- Lock the refered resource in memory.
- Specified by:
- lock in interface ResourceReference
- Returns:
- A real pointer to the resource.
- Throws:
- InvalidResourceException - is thrown if the resource is
invalid (has been deleted or everything else).
unsafeLock
public Resource unsafeLock()
throws InvalidResourceException
- Lock the refered resource in memory.
- Specified by:
- unsafeLock in interface ResourceReference
- Returns:
- A real pointer to the resource.
- Throws:
- InvalidResourceException - is thrown if the resource is
invalid (has been deleted or everything else).
nbLock
public int nbLock()
- How many locks?
- Specified by:
- nbLock in interface ResourceReference
- Returns:
- an int.
unlock
public void unlock()
- Unlock that resource from memory.
- Specified by:
- unlock in interface ResourceReference
isLocked
public boolean isLocked()
- Is that resource reference locked ?
- Specified by:
- isLocked in interface ResourceReference
- Tags copied from interface: ResourceReference
- Returns:
- a boolean.
invalidate
public void invalidate()
- Set this reference as invalid.