org.apache.jetspeed.daemon.impl
Class DiskCacheDaemon

java.lang.Object
  extended byorg.apache.jetspeed.daemon.impl.DiskCacheDaemon
All Implemented Interfaces:
Daemon, java.lang.Runnable

public class DiskCacheDaemon
extends java.lang.Object
implements Daemon

A daemon that takes all instances of the DiskCacheDaemon and makes sure that any content entries get updated on a regular basis.

Version:
$Id: DiskCacheDaemon.java,v 1.23 2004/02/23 02:48:05 jford Exp $
Author:
Kevin A. Burton

Field Summary
 
Fields inherited from interface org.apache.jetspeed.daemon.Daemon
RESULT_FAILED, RESULT_PROCESSING, RESULT_SUCCESS, RESULT_UNKNOWN, STATUS_NOT_PROCESSED, STATUS_NOT_STARTED, STATUS_PROCESSED, STATUS_PROCESSING, STATUS_STARTED, STATUS_UNKNOWN
 
Constructor Summary
DiskCacheDaemon()
           
 
Method Summary
 DaemonConfig getDaemonConfig()
          Require that Daemons have a getter for the DaemonConfig
 DaemonEntry getDaemonEntry()
          Get the entry for this daemon.
 java.lang.String getMessage()
          Provided so that a Daemon can provide a message to users.
 int getResult()
           Get the result of this daemons processing.
 int getStatus()
          Return the status for this Daemon
 void init(DaemonConfig config, DaemonEntry entry)
          Init this Daemon from the DaemonFactory
 void run()
          Go over all the documents on the system and if refresh them if necessary.
 void setResult(int result)
          Force the result of this Daemon
 void setStatus(int status)
          Set the status for this Daemon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskCacheDaemon

public DiskCacheDaemon()
Method Detail

run

public void run()
Go over all the documents on the system and if refresh them if necessary.

Specified by:
run in interface java.lang.Runnable

init

public void init(DaemonConfig config,
                 DaemonEntry entry)
Init this Daemon from the DaemonFactory

Specified by:
init in interface Daemon
See Also:
Daemon.init(org.apache.jetspeed.daemon.DaemonConfig, org.apache.jetspeed.daemon.DaemonEntry)

getDaemonConfig

public DaemonConfig getDaemonConfig()
Description copied from interface: Daemon
Require that Daemons have a getter for the DaemonConfig

Specified by:
getDaemonConfig in interface Daemon

getDaemonEntry

public DaemonEntry getDaemonEntry()
Description copied from interface: Daemon
Get the entry for this daemon.

Specified by:
getDaemonEntry in interface Daemon

getStatus

public int getStatus()
Return the status for this Daemon

Specified by:
getStatus in interface Daemon
See Also:
Daemon.STATUS_NOT_PROCESSED, Daemon.STATUS_PROCESSED, Daemon.STATUS_PROCESSING

setStatus

public void setStatus(int status)
Set the status for this Daemon

Specified by:
setStatus in interface Daemon
See Also:
Daemon.STATUS_NOT_PROCESSED, Daemon.STATUS_PROCESSED, Daemon.STATUS_PROCESSING

getResult

public int getResult()
Description copied from interface: Daemon

Get the result of this daemons processing. All Daemon implementations are responsible for defining this.

The default for this should be RESULT_UNKNOWN. This usually means that this daemon has never been called for processing.

Specified by:
getResult in interface Daemon
See Also:
Daemon.getResult()

setResult

public void setResult(int result)
Description copied from interface: Daemon
Force the result of this Daemon

Specified by:
setResult in interface Daemon
See Also:
Daemon.setResult(int result)

getMessage

public java.lang.String getMessage()
Description copied from interface: Daemon
Provided so that a Daemon can provide a message to users. Null if it has nothing to give to the user.

Specified by:
getMessage in interface Daemon
See Also:
Daemon.getMessage()


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.