|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tools.resources.AttributeHolder org.w3c.tools.resources.Resource org.w3c.tools.resources.FramedResource org.w3c.jigsaw.resources.CheckpointResource
public class CheckpointResource
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.
Field Summary | |
---|---|
protected boolean |
alive
Is our attached thread still alive ? |
protected static int |
ATTR_FLUSHCONFIG
Attribute index - Should we save the configuration ? |
protected static int |
ATTR_FLUSHLOG
Attribute index - Should we flush the logs too ? |
protected static int |
ATTR_FLUSHPROPS
Attrbute index - Should we save the properties too ? |
protected static int |
ATTR_INTERVAL
Attribute index - Backup interval, in seconds. |
protected static int |
ATTR_PRIORITY
Attribute index - The priority of the flusher thread. |
protected static int |
ATTR_TRACE_CHECK
Attribute index - should we display a trace when we perform checkpoint |
protected java.util.Date |
checkpoint
Last date at which we checkpointed the configuration |
protected java.lang.Thread |
thread
Our thread, if one is currently attached. |
Fields inherited from class org.w3c.tools.resources.FramedResource |
---|
ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener |
Fields inherited from class org.w3c.tools.resources.Resource |
---|
ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL, co, id |
Fields inherited from class org.w3c.tools.resources.AttributeHolder |
---|
attributes, values |
Constructor Summary | |
---|---|
CheckpointResource()
|
Method Summary | |
---|---|
boolean |
acceptUnload()
This is the only resource that will refuse to be unloaded ! |
void |
activate()
Start the thread for this object, only if needed. |
boolean |
getFlushConfiguration()
Get the flush configuration flag. |
boolean |
getFlushLog()
Get the flush log flag. |
boolean |
getFlushProperties()
Get the flush properties flag. |
int |
getInterval()
Get the sync interval. |
int |
getPriority()
Get the priority for our attached thread. |
boolean |
getTraceFlag()
|
void |
initialize(java.lang.Object[] values)
Activate the checkpointer at initialization time. |
void |
notifyUnload()
This resource is being unloaded. |
void |
run()
We are attached a thread, now it's time to performt the job. |
protected void |
stop()
Force our attached thread to stop. |
Methods inherited from class org.w3c.tools.resources.Resource |
---|
checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getHelpURL, getHelpURL, getIdentifier, getLastModified, getParent, getResourceReference, getServer, getSpace, getSpaceEntry, getStoreEntry, getURLPath, getValue, getValue, initialize, isInitialized, isUnloaded, pickleValues, setContext, setContext, setValue, unsafeGetContext, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, unsafeGetValue, updateAttributes |
Methods inherited from class org.w3c.tools.resources.AttributeHolder |
---|
definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int ATTR_INTERVAL
protected static int ATTR_PRIORITY
protected static int ATTR_FLUSHLOG
protected static int ATTR_FLUSHPROPS
protected static int ATTR_FLUSHCONFIG
protected static int ATTR_TRACE_CHECK
protected java.lang.Thread thread
protected java.util.Date checkpoint
protected boolean alive
Constructor Detail |
---|
public CheckpointResource()
Method Detail |
---|
public void activate()
protected void stop()
public int getInterval()
public int getPriority()
public boolean getFlushLog()
public boolean getTraceFlag()
public boolean getFlushProperties()
public boolean getFlushConfiguration()
public boolean acceptUnload()
acceptUnload
in class Resource
public void notifyUnload()
notifyUnload
in class FramedResource
public void run()
run
in interface java.lang.Runnable
public void initialize(java.lang.Object[] values)
initialize
in class FramedResource
values
- Default attribute values.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |