JTemporal Home
Tutorial

net.sf.jtemporal.spi
Interface LazyTemporalAttributeStorage.ChangeHandler<V>

Type Parameters:
V - the value held in the related LazyTemporalAttributeStorage
Enclosing class:
LazyTemporalAttributeStorage<V>

public static interface LazyTemporalAttributeStorage.ChangeHandler<V>

Applies the changes on the underlying data source.
There is only a single ChangeHandler for each LazyTemporalAttribute.
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: LazyTemporalAttributeStorage.java,v 1.17 2007/09/14 20:03:11 tabeck Exp $

Method Summary
 void clear(LazyTemporalAttributeStorage<V> source)
          Invoked when TimeSeries.remove(Instant) has been called.
 void put(LazyTemporalAttributeStorage<V> source, Period p, java.lang.Object value)
          Invoked when LazyTemporalAttributeStorage#put(Instant,Object) has been called.
 void remove(LazyTemporalAttributeStorage<V> source, Period p)
          Invoked when LazyTemporalAttributeStorage#remove(Instant) has been called.
 

Method Detail

put

void put(LazyTemporalAttributeStorage<V> source,
         Period p,
         java.lang.Object value)
Invoked when LazyTemporalAttributeStorage#put(Instant,Object) has been called.
Throwing any exception will cancel the operation.

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

remove

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

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

clear

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

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

JTemporal Home
Tutorial