JTemporal Home
Tutorial

net.sf.jtemporal
Interface CachedTimeSeries.ChangeHandler<V>

Enclosing class:
CachedTimeSeries<V>

public static interface CachedTimeSeries.ChangeHandler<V>

Applies the changes on the underlying data source.
There is only a single ChangeHandler for each CachedTimeSeries.
In a performance point of view, it's usually a good idea here to buffer the requests, in order to reduce the underlying calls granularity.

Version:
$Id: CachedTimeSeries.java,v 1.13 2007/09/14 20:03:10 tabeck Exp $

Method Summary
 void put(CachedTimeSeries<V> source, Instant i, V value)
          Invoked when TimeSeries.put(Instant, Object) has been called.
 void remove(CachedTimeSeries<V> source, Instant i)
          Invoked when TimeSeries.remove(Instant) has been called.
 void remove(CachedTimeSeries<V> source, Period p)
          Invoked when TimeSeries.remove(Instant) has been called.
 

Method Detail

put

void put(CachedTimeSeries<V> source,
         Instant i,
         V value)
Invoked when TimeSeries.put(Instant, Object) has been called.
Throwing any exception will cancel the operation.

Parameters:
source - the TimeSeries where the put method has been invoked
i - the Instant
value - the new value
Throws:
java.lang.UnsupportedOperationException - if the TimeSeries is read-only
See Also:
TimeSeries.put(Instant,Object)

remove

void remove(CachedTimeSeries<V> source,
            Instant i)
Invoked when TimeSeries.remove(Instant) has been called.
Throwing any exception will cancel the operation.

Parameters:
source - the TimeSeries where the remove method has been invoked
i - the Instant specifying the entry to be removed
Throws:
java.lang.UnsupportedOperationException - if the TimeSeries is read-only
See Also:
TimeSeries.remove(Instant)

remove

void remove(CachedTimeSeries<V> source,
            Period p)
Invoked when TimeSeries.remove(Instant) has been called.
Throwing any exception will cancel the operation.

Parameters:
source - the TimeSeries where the remove method has been invoked
p - the Period specifying the range to be removed
Throws:
java.lang.UnsupportedOperationException - if the TimeSeries is read-only
See Also:
TimeSeries.remove(Period)

JTemporal Home
Tutorial