    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

##

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

##

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

##

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

##

roots

     protected Resource roots[]

  The roots of our walk.

root

     protected ContainerInterface root

  The root resource currently being walked out.

current

     protected ResourceStore current

  The store being currently visited, if any.

walker

     protected ResourceWalker walker

  Our walk handler.

all

     protected boolean all

  Should all resources be visited ?

visited

     protected Hashtable visited

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

##

WalkerEngine

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

WalkerEngine

     public WalkerEngine(Resource resource,
                         ResourceWalker walker,
                         boolean all)

##

pathToString

     protected String pathToString(String p[])

interrupt

     public final synchronized void interrupt()

  Interrupt the underlying walker thread.

isInterrupted

     public final synchronized boolean isInterrupted()

  Has this walker been interrupted ?

  Returns:
    A boolean.

push

     protected final void push(Resource r)

  Push that resource to visit it later.

  Parameters:
    r - The resource to be visited later.

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.

isContainer

     protected final boolean isContainer(Resource resource)

visit

     protected boolean visit(Resource resource)

walk

     protected void walk()

run

     public void run()

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.

notifyStoreShutdown

     public void notifyStoreShutdown(ResourceStore store)

  ResourceStoreHolder implementation - Interrupt walk if store goes down.

  Parameters:
    store - The store going down.

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