All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.tools.store.WalkerEngine

java.lang.Object
   |
   +----w3c.tools.store.WalkerEngine

public class WalkerEngine
extends Object
implements ResourceStoreHolder, Runnable

Variable Index

 o all
Should all resources be visited ?
 o current
The store being currently visited, if any.
 o root
The root resource currently being walked out.
 o roots
The roots of our walk.
 o visited
Cycle detection: list of visited resource store (by identifiers).
 o walker
Our walk handler.

Constructor Index

 o WalkerEngine(Resource, ResourceWalker, boolean)
 o WalkerEngine(Resource[], ResourceWalker, boolean)

Method Index

 o acceptStoreUnload(ResourceStore)
ResourceStoreHolder implementation - Don't unload the store under visit.
 o interrupt()
Interrupt the underlying walker thread.
 o isContainer(Resource)
 o isInterrupted()
Has this walker been interrupted ?
 o notifyStoreShutdown(ResourceStore)
ResourceStoreHolder implementation - Interrupt walk if store goes down.
 o notifyStoreStabilize(ResourceStore)
ResourceStoreHolder implementation - never touch the store under visit.
 o pathToString(String[])
 o pop()
Get the next container resource to visit.
 o push(Resource)
Push that resource to visit it later.
 o run()
 o visit(Resource)
 o walk()

Variables

 o roots
 protected Resource roots[]
The roots of our walk.

 o root
 protected ContainerInterface root
The root resource currently being walked out.

 o current
 protected ResourceStore current
The store being currently visited, if any.

 o walker
 protected ResourceWalker walker
Our walk handler.

 o all
 protected boolean all
Should all resources be visited ?

 o visited
 protected Hashtable visited
Cycle detection: list of visited resource store (by identifiers).

Constructors

 o WalkerEngine
 public WalkerEngine(Resource roots[],
                     ResourceWalker walker,
                     boolean all)
 o WalkerEngine
 public WalkerEngine(Resource resource,
                     ResourceWalker walker,
                     boolean all)

Methods

 o pathToString
 protected String pathToString(String p[])
 o interrupt
 public final synchronized void interrupt()
Interrupt the underlying walker thread.

 o isInterrupted
 public final synchronized boolean isInterrupted()
Has this walker been interrupted ?

Returns:
A boolean.
 o push
 protected final void push(Resource r)
Push that resource to visit it later.

Parameters:
r - The resource to be visited later.
 o pop
 protected final ContainerInterface pop()
Get the next container resource to visit. If for some reasons, the next resource to visit cannot be unloaded, the walker handler is invoked with appropriate exception.

Returns:
A ContainerInterface compliant resource, or null if the stack is empty.
 o isContainer
 protected final boolean isContainer(Resource resource)
 o visit
 protected boolean visit(Resource resource)
 o walk
 protected void walk()
 o run
 public void run()
 o acceptStoreUnload
 public boolean acceptStoreUnload(ResourceStore store)
ResourceStoreHolder implementation - Don't unload the store under visit.

Parameters:
store - The store that may be unloaded.
Returns:
Always false to indicate our wills.
 o notifyStoreShutdown
 public void notifyStoreShutdown(ResourceStore store)
ResourceStoreHolder implementation - Interrupt walk if store goes down.

Parameters:
store - The store going down.
 o notifyStoreStabilize
 public void notifyStoreStabilize(ResourceStore store)
ResourceStoreHolder implementation - never touch the store under visit.

Parameters:
store - The store that has to be saved.

All Packages  Class Hierarchy  This Package  Previous  Next  Index