|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.graph.connector.path.AbstractPathRepositorySource
org.jboss.dna.connector.meta.jdbc.JdbcMetadataSource
@ThreadSafe public class JdbcMetadataSource
Field Summary | |
---|---|
static String |
DEFAULT_NAME_OF_DEFAULT_CATALOG
The initial catalog name for databases that do not support catalogs is ""default" ", unless
otherwise specified. |
static String |
DEFAULT_NAME_OF_DEFAULT_SCHEMA
The initial schema name for databases that do not support schemas is ""default" ", unless
otherwise specified. |
static String |
DEFAULT_NAME_OF_DEFAULT_WORKSPACE
The initial name of the default workspace is ""default" ", unless otherwise specified. |
static boolean |
SUPPORTS_CREATING_WORKSPACES
This source does not support creating workspaces. |
static boolean |
SUPPORTS_UPDATES
This source does not support updates. |
Fields inherited from class org.jboss.dna.graph.connector.path.AbstractPathRepositorySource |
---|
DEFAULT_CACHE_POLICY, DEFAULT_RETRY_LIMIT, DEFAULT_ROOT_NODE_UUID |
Constructor Summary | |
---|---|
JdbcMetadataSource()
|
Method Summary | |
---|---|
void |
close()
Signal this source that it is no longer needed and should begin the process of reclaiming or closing all resources that it has acquired. |
RepositorySourceCapabilities |
getCapabilities()
Get the capabilities for this source. |
RepositoryConnection |
getConnection()
Get a connection from this source. |
String |
getDataSourceJndiName()
|
String |
getDefaultCatalogName()
Get the name of the default catalog. |
String |
getDefaultSchemaName()
Get the name of the default schema. |
String |
getDefaultWorkspaceName()
Get the name of the default workspace. |
String |
getDriverClassloaderName()
|
String |
getDriverClassName()
|
int |
getIdleTimeInSecondsBeforeTestingConnections()
|
int |
getMaximumConnectionIdleTimeInSeconds()
|
int |
getMaximumConnectionsInPool()
|
int |
getMaximumSizeOfStatementCache()
|
MetadataCollector |
getMetadataCollector()
Returns the metadata collector instance |
String |
getMetadataCollectorClassName()
Get the class name of the metadata collector. |
int |
getMinimumConnectionsInPool()
|
int |
getNumberOfConnectionsToAcquireAsNeeded()
|
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
|
String |
getPassword()
|
Reference |
getReference()
|
String |
getUrl()
|
String |
getUsername()
|
void |
setDataSourceJndiName(String dataSourceJndiName)
|
void |
setDefaultCatalogName(String defaultCatalogName)
Set the name of the catalog that should be used when the database does not support catalogs. |
void |
setDefaultSchemaName(String defaultSchemaName)
Set the name of the schema that should be used when the database does not support schemas. |
void |
setDefaultWorkspaceName(String nameOfDefaultWorkspace)
Set the name of the workspace that should be used when clients don't specify a workspace. |
void |
setDriverClassloaderName(String driverClassloaderName)
|
void |
setDriverClassName(String driverClassName)
|
void |
setIdleTimeInSecondsBeforeTestingConnections(int idleTimeInSecondsBeforeTestingConnections)
|
void |
setMaximumConnectionIdleTimeInSeconds(int maximumConnectionIdleTimeInSeconds)
|
void |
setMaximumConnectionsInPool(int maximumConnectionsInPool)
|
void |
setMaximumSizeOfStatementCache(int maximumSizeOfStatementCache)
|
void |
setMetadataCollectorClassName(String metadataCollectorClassName)
Set the class name of the metadata collector and instantiates a new metadata collector object for that class |
void |
setMinimumConnectionsInPool(int minimumConnectionsInPool)
|
void |
setNumberOfConnectionsToAcquireAsNeeded(int numberOfConnectionsToAcquireAsNeeded)
|
void |
setPassword(String password)
|
void |
setUpdatesAllowed(boolean updatesAllowed)
In-memory connectors aren't shared and cannot be loaded from external sources if updates are not allowed. |
void |
setUrl(String url)
|
void |
setUsername(String username)
|
Methods inherited from class org.jboss.dna.graph.connector.path.AbstractPathRepositorySource |
---|
areUpdatesAllowed, getCachePolicy, getName, getPathRepositoryCache, getRepositoryContext, getRetryLimit, getRootNodeUuid, initialize, setCachePolicy, setName, setRetryLimit, setRootNodeUuid |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean SUPPORTS_UPDATES
public static final boolean SUPPORTS_CREATING_WORKSPACES
public static final String DEFAULT_NAME_OF_DEFAULT_WORKSPACE
name of the default workspace
is ""default" ", unless otherwise specified.
public static final String DEFAULT_NAME_OF_DEFAULT_CATALOG
catalog name for databases that do not support catalogs
is ""default" ", unless
otherwise specified.
public static final String DEFAULT_NAME_OF_DEFAULT_SCHEMA
schema name for databases that do not support schemas
is ""default" ", unless
otherwise specified.
Constructor Detail |
---|
public JdbcMetadataSource()
Method Detail |
---|
public void close()
AbstractPathRepositorySource
connections
may still be in use, this method may not necessarily close all
resources immediately.
This is a required method, and must be called when this source is no longer needed if one or more connections
have been obtained since the previous call to this method.
Note that calling this method also does not preclude obtaining more connections
after this method
is called. If that happens, this source should simply reacquire any resources necessary to provide additional connections,
and this method needs to be called once again.
close
in interface RepositorySource
close
in class AbstractPathRepositorySource
RepositorySource.close()
public RepositorySourceCapabilities getCapabilities()
RepositorySource
getCapabilities
in interface RepositorySource
public RepositoryConnection getConnection() throws RepositorySourceException
RepositorySource
getConnection
in interface RepositorySource
RepositorySourceException
- if there is a problem obtaining a connectionpublic Reference getReference()
getReference
in interface Referenceable
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance
in interface ObjectFactory
Exception
public String getDataSourceJndiName()
public void setDataSourceJndiName(String dataSourceJndiName)
dataSourceJndiName
- Sets dataSourceJndiName to the specified value.public String getDriverClassName()
public void setDriverClassName(String driverClassName)
driverClassName
- Sets driverClassName to the specified value.public String getDriverClassloaderName()
public void setDriverClassloaderName(String driverClassloaderName)
driverClassloaderName
- Sets driverClassloaderName to the specified value.public String getUsername()
public void setUsername(String username)
username
- Sets username to the specified value.public String getPassword()
public void setPassword(String password)
password
- Sets password to the specified value.public String getUrl()
public void setUrl(String url)
url
- Sets url to the specified value.public int getMaximumConnectionsInPool()
public void setMaximumConnectionsInPool(int maximumConnectionsInPool)
maximumConnectionsInPool
- Sets maximumConnectionsInPool to the specified value.public int getMinimumConnectionsInPool()
public void setMinimumConnectionsInPool(int minimumConnectionsInPool)
minimumConnectionsInPool
- Sets minimumConnectionsInPool to the specified value.public int getMaximumConnectionIdleTimeInSeconds()
public void setMaximumConnectionIdleTimeInSeconds(int maximumConnectionIdleTimeInSeconds)
maximumConnectionIdleTimeInSeconds
- Sets maximumConnectionIdleTimeInSeconds to the specified value.public int getMaximumSizeOfStatementCache()
public void setMaximumSizeOfStatementCache(int maximumSizeOfStatementCache)
maximumSizeOfStatementCache
- Sets maximumSizeOfStatementCache to the specified value.public int getNumberOfConnectionsToAcquireAsNeeded()
public void setNumberOfConnectionsToAcquireAsNeeded(int numberOfConnectionsToAcquireAsNeeded)
numberOfConnectionsToAcquireAsNeeded
- Sets numberOfConnectionsToAcquireAsNeeded to the specified value.public int getIdleTimeInSecondsBeforeTestingConnections()
public void setIdleTimeInSecondsBeforeTestingConnections(int idleTimeInSecondsBeforeTestingConnections)
idleTimeInSecondsBeforeTestingConnections
- Sets idleTimeInSecondsBeforeTestingConnections to the specified value.public String getDefaultWorkspaceName()
getDefaultWorkspaceName
in interface PathRepositorySource
public void setDefaultWorkspaceName(String nameOfDefaultWorkspace)
nameOfDefaultWorkspace
- the name of the workspace that should be used by default, or null if the
default name
should be usedpublic String getDefaultCatalogName()
public void setDefaultCatalogName(String defaultCatalogName)
defaultCatalogName
- the name that should be used as the catalog name by default, or null if the
default name
should be usedpublic String getDefaultSchemaName()
public void setDefaultSchemaName(String defaultSchemaName)
defaultSchemaName
- the name that should be used as the schema name by default, or null if the
default name
should be usedpublic String getMetadataCollectorClassName()
public void setMetadataCollectorClassName(String metadataCollectorClassName) throws ClassNotFoundException, IllegalAccessException, InstantiationException
metadataCollectorClassName
- the class name for the metadata collector, or null if the
default metadata collector
should be used
ClassNotFoundException
- if the the named metadata collector class cannot be located
IllegalAccessException
- if the metadata collector class or its nullary constructor is not accessible.
InstantiationException
- if the metadata collector class represents an abstract class, an interface, an array class,
a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other
reason.
ClassCastException
- if the given class cannot be cast to MetadataCollector
.Class.forName(String)
,
Class.newInstance()
public MetadataCollector getMetadataCollector()
public void setUpdatesAllowed(boolean updatesAllowed)
setUpdatesAllowed
in interface PathRepositorySource
updatesAllowed
- must be true
RepositorySourceException
- if updatesAllowed != true
.PathRepositorySource.areUpdatesAllowed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |