| java.lang.Object org.w3c.tools.resources.AttributeHolder org.w3c.tools.resources.Resource org.w3c.tools.resources.FramedResource org.w3c.jigsaw.resources.CheckpointResource
CheckpointResource | public class CheckpointResource extends FramedResource implements Runnable(Code) | | A resource that will checkpoint the configuration at regular intervals.
This resource will make sure that current configuration is backed up to
disk at regular (configurable) intervals.
The webmaster can customize what part of the configuration is to be
backed up through boolean attributes.
|
Method Summary | |
public boolean | acceptUnload() | public synchronized void | activate() Start the thread for this object, only if needed. | public boolean | getFlushConfiguration() Get the flush configuration flag. | public boolean | getFlushLog() Get the flush log flag. | public boolean | getFlushProperties() Get the flush properties flag. | public int | getInterval() Get the sync interval. | public int | getPriority() Get the priority for our attached thread. | public boolean | getTraceFlag() | public void | initialize(Object values) Activate the checkpointer at initialization time. | public void | notifyUnload() This resource is being unloaded.
Unloading that object will also stop the thread. | public void | run() We are attached a thread, now it's time to performt the job. | protected synchronized void | stop() Force our attached thread to stop. |
ATTR_FLUSHCONFIG | protected static int ATTR_FLUSHCONFIG(Code) | | Attribute index - Should we save the configuration ?
|
ATTR_FLUSHLOG | protected static int ATTR_FLUSHLOG(Code) | | Attribute index - Should we flush the logs too ?
|
ATTR_FLUSHPROPS | protected static int ATTR_FLUSHPROPS(Code) | | Attrbute index - Should we save the properties too ?
|
ATTR_INTERVAL | protected static int ATTR_INTERVAL(Code) | | Attribute index - Backup interval, in seconds.
|
ATTR_PRIORITY | protected static int ATTR_PRIORITY(Code) | | Attribute index - The priority of the flusher thread.
|
ATTR_TRACE_CHECK | protected static int ATTR_TRACE_CHECK(Code) | | Attribute index - should we display a trace when we perform checkpoint
|
alive | protected boolean alive(Code) | | Is our attached thread still alive ?
|
checkpoint | protected Date checkpoint(Code) | | Last date at which we checkpointed the configuration
|
thread | protected Thread thread(Code) | | Our thread, if one is currently attached.
|
acceptUnload | public boolean acceptUnload()(Code) | | This is the only resource that will refuse to be unloaded !
Always false. |
activate | public synchronized void activate()(Code) | | Start the thread for this object, only if needed.
|
getFlushConfiguration | public boolean getFlushConfiguration()(Code) | | Get the flush configuration flag.
A boolean, true oif the configuration is to beflushed at each interval, false otherwise. |
getFlushLog | public boolean getFlushLog()(Code) | | Get the flush log flag.
A boolean, true if the log is to be flushed at each refresh interval, false otherwise. |
getFlushProperties | public boolean getFlushProperties()(Code) | | Get the flush properties flag.
A boolean, true if the properties are to beflushed, false otherwise. |
getInterval | public int getInterval()(Code) | | Get the sync interval.
An integer number of seconds, or -1 if undefined. |
getPriority | public int getPriority()(Code) | | Get the priority for our attached thread.
An integer priority for the thread, which defaults to2 if undefined. |
getTraceFlag | public boolean getTraceFlag()(Code) | | |
initialize | public void initialize(Object values)(Code) | | Activate the checkpointer at initialization time.
|
notifyUnload | public void notifyUnload()(Code) | | This resource is being unloaded.
Unloading that object will also stop the thread. However, there is
a bug here, since if the resource gets unloaded for some reason, it
will not be able to wakeup itself at next checkpoint time.
|
run | public void run()(Code) | | We are attached a thread, now it's time to performt the job.
|
stop | protected synchronized void stop()(Code) | | Force our attached thread to stop.
|
Methods inherited from org.w3c.tools.resources.FramedResource | public void addAttributeChangedListener(AttributeChangedListener l)(Code)(Java Doc) public void addStructureChangedListener(StructureChangedListener l)(Code)(Java Doc) public synchronized ResourceReference[] collectFramesReference(Class c)(Code)(Java Doc) public synchronized void delete() throws MultipleLockException(Code)(Java Doc) protected void disableEvent()(Code)(Java Doc) protected void displayEvent(FramedResource fr, EventObject evt)(Code)(Java Doc) protected void enableEvent()(Code)(Java Doc) protected boolean eventDisabled()(Code)(Java Doc) protected void fireAttributeChangeEvent(AttributeChangedEvent evt)(Code)(Java Doc) protected void fireStructureChangedEvent(int type)(Code)(Java Doc) protected void fireStructureChangedEvent(StructureChangedEvent evt)(Code)(Java Doc) public void frameAdded(FrameEvent evt)(Code)(Java Doc) public void frameModified(FrameEvent evt)(Code)(Java Doc) public void frameRemoved(FrameEvent evt)(Code)(Java Doc) public Object getClone(Object values)(Code)(Java Doc) public synchronized ResourceFrame getFrame(Class c, String identifier)(Code)(Java Doc) public synchronized ResourceFrame getFrame(String classname)(Code)(Java Doc) public synchronized ResourceReference getFrameReference(Class c)(Code)(Java Doc) public synchronized ResourceReference getFrameReference(ResourceFrame frame)(Code)(Java Doc) public synchronized ResourceReference[] getFramesReference()(Code)(Java Doc) public int getOid()(Code)(Java Doc) public void initialize(Object values)(Code)(Java Doc) public boolean lookup(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc) public void markModified()(Code)(Java Doc) public void notifyUnload()(Code)(Java Doc) public ReplyInterface perform(RequestInterface request) throws ProtocolException, ResourceException(Code)(Java Doc) protected ReplyInterface performFrames(RequestInterface request) throws ProtocolException, ResourceException(Code)(Java Doc) protected void postAttributeChangeEvent(int idx, Object newvalue)(Code)(Java Doc) public void postEvent(ResourceEvent evt)(Code)(Java Doc) protected void postStructureChangedEvent(ResourceReference rr, int type)(Code)(Java Doc) protected void postStructureChangedEvent(int type)(Code)(Java Doc) public void processEvent(ResourceEvent evt)(Code)(Java Doc) public void registerFrame(ResourceFrame frame, Hashtable defs)(Code)(Java Doc) protected void registerFrameIfNone(String classname, String identifier) throws ClassNotFoundException, IllegalAccessException, InstantiationException, ClassCastException(Code)(Java Doc) public void removeAttributeChangedListener(AttributeChangedListener l)(Code)(Java Doc) public void removeStructureChangedListener(StructureChangedListener l)(Code)(Java Doc) public synchronized void setSilentValue(int idx, Object value)(Code)(Java Doc) public synchronized void setSilentValue(String name, Object value)(Code)(Java Doc) public synchronized void setValue(int idx, Object value)(Code)(Java Doc) public synchronized void unregisterFrame(ResourceFrame frame)(Code)(Java Doc)
|
Methods inherited from org.w3c.tools.resources.AttributeHolder | public boolean definesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc) public boolean definesAttribute(String name) throws IllegalAttributeAccess(Code)(Java Doc) public Attribute[] getAttributes()(Code)(Java Doc) public boolean getBoolean(int idx, boolean def)(Code)(Java Doc) public char getChar(int idx, char def)(Code)(Java Doc) public Object getClone(Object values)(Code)(Java Doc) public synchronized Object getClone()(Code)(Java Doc) public synchronized Object getClone(Hashtable defs)(Code)(Java Doc) public double getDouble(int idx, double def)(Code)(Java Doc) public float getFloat(int idx, float def)(Code)(Java Doc) public int getInt(int idx, int def)(Code)(Java Doc) public long getLong(int idx, long def)(Code)(Java Doc) public String getString(int idx, String def)(Code)(Java Doc) public synchronized Object getValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc) public Object getValue(String name, Object def) throws IllegalAttributeAccess(Code)(Java Doc) public synchronized void initialize(Object nvalues)(Code)(Java Doc) public synchronized void initialize(Hashtable defs)(Code)(Java Doc) public int lookupAttribute(String name)(Code)(Java Doc) public synchronized void pickleValues(Hashtable defs)(Code)(Java Doc) public void print(PrintStream out)(Code)(Java Doc) public void setBoolean(int idx, boolean b)(Code)(Java Doc) public void setChar(int idx, char ch) throws IllegalAttributeAccess(Code)(Java Doc) public void setDouble(int idx, double d) throws IllegalAttributeAccess(Code)(Java Doc) public void setFloat(int idx, float f) throws IllegalAttributeAccess(Code)(Java Doc) public void setInt(int idx, int i) throws IllegalAttributeAccess(Code)(Java Doc) public void setLong(int idx, long l) throws IllegalAttributeAccess(Code)(Java Doc) public void setString(int idx, String s) throws IllegalAttributeAccess(Code)(Java Doc) public synchronized void setValue(int idx, Object value)(Code)(Java Doc) public void setValue(String name, Object value)(Code)(Java Doc) public boolean unsafeDefinesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc) public double unsafeGetDouble(int idx, double def)(Code)(Java Doc) public String unsafeGetString(int idx, String def)(Code)(Java Doc) public Object unsafeGetValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc)
|
|
|