org.mmbase.datatypes.processors
Class DelayedSetter

Package class diagram package DelayedSetter
java.lang.Object
  extended by org.mmbase.datatypes.processors.DelayedSetter
All Implemented Interfaces:
Serializable, Processor

public class DelayedSetter
extends Object
implements Processor

If you use a DelaySetter on a field, than the process of the field will make sure that the field is not actually changed (the original value is returned). In stead, the field is only scheduled for update. If another update for this field occurs, only this scheduled task is changed. This way, very many updates on this field, result in only few updates in the database.

Since:
MMBase-1.9
Version:
$Id: DelayedSetter.java 42854 2010-07-11 11:18:32Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Nested Class Summary
protected static class DelayedSetter.NodeField
           
protected  class DelayedSetter.Setter
           
(package private) static class DelayedSetter.SetThread
           
 
Field Summary
(package private) static DelayQueue<DelayedSetter.Setter> queue
           
(package private) static Map<DelayedSetter.NodeField,DelayedSetter.Setter> queued
           
 
Constructor Summary
DelayedSetter()
           
 
Method Summary
 Object process(Node node, Field field, Object value)
           
 void setDelay(long d)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

queue

static final DelayQueue<DelayedSetter.Setter> queue

queued

static Map<DelayedSetter.NodeField,DelayedSetter.Setter> queued
Constructor Detail

DelayedSetter

public DelayedSetter()
Method Detail

setDelay

public void setDelay(long d)

process

public final Object process(Node node,
                            Field field,
                            Object value)
Specified by:
process in interface Processor

toString

public String toString()
Overrides:
toString in class Object


MMBase Poll 2.0-SNAPSHOT - 2013-03-30T06:52