|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.util.CompoundClosableAllocation net.sf.farrago.util.FarragoCompoundAllocation net.sf.farrago.plugin.FarragoPluginCache net.sf.farrago.namespace.util.FarragoDataWrapperCache
public class FarragoDataWrapperCache
FarragoDataWrapperCache serves as a private cache of FarragoMedDataWrapper and FarragoMedDataServer instances. It requires an underlying shared FarragoObjectCache.
Nested Class Summary | |
---|---|
private class |
FarragoDataWrapperCache.ServerFactory
|
private class |
FarragoDataWrapperCache.WrapperFactory
|
Field Summary | |
---|---|
private FennelDbHandle |
fennelDbHandle
|
private DataSource |
loopbackDataSource
|
Fields inherited from class org.eigenbase.util.CompoundClosableAllocation |
---|
allocations |
Constructor Summary | |
---|---|
FarragoDataWrapperCache(FarragoAllocationOwner owner,
FarragoObjectCache sharedCache,
FarragoPluginClassLoader classLoader,
FarragoRepos repos,
FennelDbHandle fennelDbHandle,
DataSource loopbackDataSource)
Creates an empty cache. |
Method Summary | |
---|---|
void |
closeAllocation()
Closes this object. |
Properties |
getStorageOptionsAsProperties(FemElementWithStorageOptions element)
Extracts the storage options for an element into a Properties. |
FarragoMedColumnSet |
loadColumnSetFromCatalog(FemBaseColumnSet baseColumnSet,
FarragoTypeFactory typeFactory)
Loads a FarragoMedColumnSet from its catalog definition. |
FarragoMedDataServer |
loadServer(String mofId,
FarragoMedDataWrapper dataWrapper,
Properties options)
Loads a data server, or uses a cached instance. |
FarragoMedDataServer |
loadServerFromCatalog(FemDataServer femServer)
Loads a data server based on its catalog definition. |
FarragoMedDataWrapper |
loadWrapper(String mofId,
String libraryName,
Properties options)
Loads a data wrapper, or uses a cached instance. |
FarragoMedDataWrapper |
loadWrapperFromCatalog(FemDataWrapper femWrapper)
Loads a data wrapper based on its catalog definition. |
Methods inherited from class net.sf.farrago.plugin.FarragoPluginCache |
---|
addToPrivateCache, getMapMofIdToPlugin, getRepos, getSharedCache, initializePlugin, searchPrivateCache |
Methods inherited from class org.eigenbase.util.CompoundClosableAllocation |
---|
addAllocation, forgetAllocation, hasAllocations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eigenbase.util.ClosableAllocationOwner |
---|
addAllocation |
Field Detail |
---|
private FennelDbHandle fennelDbHandle
private DataSource loopbackDataSource
Constructor Detail |
---|
public FarragoDataWrapperCache(FarragoAllocationOwner owner, FarragoObjectCache sharedCache, FarragoPluginClassLoader classLoader, FarragoRepos repos, FennelDbHandle fennelDbHandle, DataSource loopbackDataSource)
owner
- FarragoAllocationOwner for this cache, to make sure
everything gets discarded eventuallysharedCache
- underlying shared cacherepos
- FarragoRepos for wrapper initializationfennelDbHandle
- FennelDbHandle for wrapper initializationloopbackDataSource
- a DataSource for establishing a loopback
connection into Farrago, or null if none is availableMethod Detail |
---|
public FarragoMedDataWrapper loadWrapper(String mofId, String libraryName, Properties options)
mofId
- key by which the wrapper can be uniquely identified (Farrago
uses the MofId of the catalog object representing the wrapper)libraryName
- name of the library containing the wrapper
implementationoptions
- wrapper-specific options
public FarragoMedDataServer loadServer(String mofId, FarragoMedDataWrapper dataWrapper, Properties options)
mofId
- key by which the server can be uniquely identified (Farrago
uses the MofId of the catalog object representing the server)dataWrapper
- FarragoMedDataWrapper which provides access to the
serveroptions
- server-specific options
public FarragoMedDataWrapper loadWrapperFromCatalog(FemDataWrapper femWrapper)
femWrapper
- catalog definition for data wrapper to load
public FarragoMedDataServer loadServerFromCatalog(FemDataServer femServer)
femServer
- catalog definition for data server to load
public FarragoMedColumnSet loadColumnSetFromCatalog(FemBaseColumnSet baseColumnSet, FarragoTypeFactory typeFactory)
baseColumnSet
- column set definitiontypeFactory
- factory for column types
public Properties getStorageOptionsAsProperties(FemElementWithStorageOptions element)
${varname}
get expanded on read.
element
- FemElement we want the options from
public void closeAllocation()
ClosableAllocation
closeAllocation
in interface ClosableAllocation
closeAllocation
in class CompoundClosableAllocation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |