|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface CachedDataSourceFactory.Callback<T>
Callback used to construct a value based on the DataSource
. The
implementation SHOULD dispose the data source.
This interface is designed to be implemented by clients. |
Method Summary | |
---|---|
T |
createValue(DataSource ds,
boolean bIsCached,
Context ctx)
Constructs the cached value based on the DataSource and the
COR context. |
void |
disposeValue(T value)
Releases data associates with the cache value. |
Method Detail |
---|
T createValue(DataSource ds, boolean bIsCached, Context ctx) throws java.io.IOException
DataSource
and the
COR context. This method is called in case of a cache miss, the
DataSource
is the result of a COR lookup to the requested
URI. The caching characteristics depend on the DataSource
and
cannot be modified in this callback. The callback becomes the owner
of the DataSource
and either needs to dispose it during this
call or as a consequence of disposing the return value.
ds
- the source DataSource
, not null
. The
callback becomes the owner of the DataSource
.bIsCached
- if true
the created value is meant to. be
stored in a cache and will be accessed multiple times (in
case of subsequent cache hits). The value also needs to be
serializable in case of cache replication. If
false
the value is not cached and will only
be accessed one single time. The
disposeValue(Object)
will be called if the value
is no longer in use.ctx
- the COR context for the transformation, no
null
java.io.IOException
void disposeValue(T value)
value
- value to dispose, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |