shocks.framework.meta
Interface MetadataRepository

All Known Implementing Classes:
CentralMetadataRepository, MetadataRepositoryProxy

public interface MetadataRepository

The MetadataRepository is the prototypical instance caching mechanism used by the entire Shocks framework. It's role is simple: Provide a storage, retrieval and monitoring interface for an underlying instance pooling mechanism. The details of the underlying system are purposefully abstract, to allow for flexibility in the underlying implementation.


Method Summary
 void addDataSource(DataSource instance)
          Installs a DataSource into an instance pool.
 java.util.Set getTypeSet(java.lang.String type)
          Get a Set containing one instance of every bean in the repository corresponding to the specified type.
 DataSource leaseDataSource(java.lang.String type, java.lang.String name)
          Lease a DataSource of the appropriate type and name from the appropriate instance pool.
 void release(DataSource instance)
          Releases the specified DataSource back into its appropriate instance pool.
 

Method Detail

addDataSource

public void addDataSource(DataSource instance)
Installs a DataSource into an instance pool.

Parameters:
instance -

leaseDataSource

public DataSource leaseDataSource(java.lang.String type,
                                  java.lang.String name)
Lease a DataSource of the appropriate type and name from the appropriate instance pool.

Parameters:
type -
name -
Returns:
DataSource

release

public void release(DataSource instance)
Releases the specified DataSource back into its appropriate instance pool.

Parameters:
instance -

getTypeSet

public java.util.Set getTypeSet(java.lang.String type)
Get a Set containing one instance of every bean in the repository corresponding to the specified type.

Parameters:
type -
Returns:
Set