|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.tools.jdbm.jdbmResourceStore
Field Summary | |
static int |
LOADED_LIMIT
|
static int |
LOADED_THRESOLD
|
Constructor Summary | |
jdbmResourceStore()
|
Method Summary | |
boolean |
acceptUnload()
|
void |
addResource(org.w3c.tools.resources.Resource resource)
Add this resource to this resource store. |
protected void |
dbmError(java.lang.Exception ex,
java.lang.String msg)
A jdbm error has occured, this is potentially serious. |
java.util.Enumeration |
enumerateResourceIdentifiers()
Enumerate all the resources saved in this store. |
java.lang.String |
getIdentifier()
Get the identifier for that store. |
int |
getLoadedCount()
|
protected byte[] |
getResourceBytes(java.lang.String identifier)
Get the bytes that are the pickled version of the given resource. |
int |
getVersion()
|
boolean |
hasResource(java.lang.String identifier)
Check for the existence of a resource in this store. |
void |
initialize(ResourceStoreManager manager,
java.lang.Object token,
java.io.File repository)
This resource store is being built, initialize it with the given arg. |
void |
listLRU(java.io.PrintStream out,
java.lang.String msg)
|
org.w3c.tools.resources.Resource |
loadResource(java.lang.String identifier)
|
org.w3c.tools.resources.Resource |
loadResource(java.lang.String identifier,
java.util.Hashtable defs)
Restore the resource whose name is given. |
org.w3c.tools.resources.Resource |
lookupResource(java.lang.String identifier)
Get this resource, but only if already loaded. |
static void |
main(java.lang.String[] args)
Dump all resources. |
void |
markModified(org.w3c.tools.resources.Resource resource)
Mark this resource as modified. |
void |
removeResource(java.lang.String identifier)
Remove this resource from the repository. |
void |
renameResource(java.lang.String oldid,
java.lang.String newid)
|
protected void |
reorganize()
|
void |
runStoreSweeper()
|
void |
save()
Save this store. |
protected void |
saveResource(org.w3c.tools.jdbm.jdbmResource entry)
|
void |
saveResource(org.w3c.tools.resources.Resource resource)
Stabilize the resource having the given identifier. |
void |
setPersist(org.w3c.tools.resources.Resource resource)
|
void |
shutdown()
Shutdown this store. |
protected void |
startReorganize()
|
void |
unloadResource()
Unload one selected resource from the store. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int LOADED_LIMIT
public static final int LOADED_THRESOLD
Constructor Detail |
public jdbmResourceStore()
Method Detail |
protected void reorganize()
protected final void startReorganize()
public java.lang.String getIdentifier()
public int getVersion()
public void setPersist(org.w3c.tools.resources.Resource resource)
public void listLRU(java.io.PrintStream out, java.lang.String msg)
public void runStoreSweeper()
public final int getLoadedCount()
public void unloadResource()
protected void dbmError(java.lang.Exception ex, java.lang.String msg)
ex
- The dbm exception.msg
- An informative description of the error.protected byte[] getResourceBytes(java.lang.String identifier)
identifier
- The resource identifier.protected void saveResource(org.w3c.tools.jdbm.jdbmResource entry)
public org.w3c.tools.resources.Resource loadResource(java.lang.String identifier, java.util.Hashtable defs) throws org.w3c.tools.resources.InvalidResourceException
identifier
- The identifier of the resource to restore.defs
- Default attribute values. If the resource needs to be
restored from its pickled version, this Hashtable provides
a set of default values for some of the attributes.public org.w3c.tools.resources.Resource loadResource(java.lang.String identifier) throws org.w3c.tools.resources.InvalidResourceException
public void renameResource(java.lang.String oldid, java.lang.String newid)
public org.w3c.tools.resources.Resource lookupResource(java.lang.String identifier)
identifier
- The resource identifier.public void saveResource(org.w3c.tools.resources.Resource resource)
identifier
- The resource identifier.public void addResource(org.w3c.tools.resources.Resource resource)
resource
- The resource to be added.public void removeResource(java.lang.String identifier)
identifier
- The identifier of the resource to be removed.public void markModified(org.w3c.tools.resources.Resource resource)
identifier
- The identifier of the modified resource.public boolean acceptUnload()
public void shutdown()
public void save()
public java.util.Enumeration enumerateResourceIdentifiers()
public boolean hasResource(java.lang.String identifier)
identifier
- The identifier of the resource to check.public void initialize(ResourceStoreManager manager, java.lang.Object token, java.io.File repository)
repository
- A file, giving the location of the associated
repository.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |