|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CachedDataSourceFactory<T>
Representation of a DataSourceFactoryEx
that caches information based
on a DataSource
.
Nested Class Summary | |
---|---|
static interface |
CachedDataSourceFactory.Callback<T>
Callback used to construct a value based on the DataSource . |
static interface |
CachedDataSourceFactory.UncacheableValue<T>
Represents a cache value that is not stored in the cache |
static interface |
CachedDataSourceFactory.Value<T>
Represents the cache value. |
Field Summary |
---|
Fields inherited from interface com.ibm.portal.resolver.data.DataSourceFactoryEx |
---|
DEFAULT_MODE, EMPTY_PARAMETERS |
Method Summary | |
---|---|
CachedDataSourceFactory.Callback<? extends T> |
getCallback()
Returns the callback interface used by this cache |
DataSourceFactoryEx |
getDataSourceFactory()
Returns the factory used to execute the downstream lookups for the DataSource objects. |
CachedDataSourceFactory.Value<T> |
newSource(java.net.URI uri,
java.lang.String mode,
java.util.Map<java.lang.String,java.lang.String[]> params,
Context ctx)
Retrieves the value from a cache or constructs it by invoking the attached CachedDataSourceFactory.Callback interface. |
Method Detail |
---|
CachedDataSourceFactory.Callback<? extends T> getCallback()
DataSourceFactoryEx getDataSourceFactory()
DataSource
objects.
null
CachedDataSourceFactory.Value<T> newSource(java.net.URI uri, java.lang.String mode, java.util.Map<java.lang.String,java.lang.String[]> params, Context ctx) throws java.io.IOException
CachedDataSourceFactory.Callback
interface. The retrieved value MUST be disposed
by the caller via the CachedDataSourceFactory.UncacheableValue.dispose()
method.
newSource
in interface DataSourceFactoryEx
uri
- URI of the addressed resourcemode
- mode constantparams
- parameters map (String
-> String[]
).
This map is potentially unmodifiablectx
- Content Operations Registry (COR) context
null
. If the
return value is not null
then the
CachedDataSourceFactory.UncacheableValue.dispose()
method should be called when the value is
not longer used.
java.io.IOException
- - if the data source cannot be created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |