|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.connector.base.AbstractRepositorySource
org.modeshape.graph.connector.base.AbstractNodeCachingRepositorySource<Path,PathNode>
org.modeshape.connector.meta.jdbc.JdbcMetadataSource
@ThreadSafe public class JdbcMetadataSource
Field Summary | |
---|---|
protected static String |
CACHE_POLICY
|
protected static String |
DATA_SOURCE_JNDI_NAME
|
protected static String |
DEFAULT_CATALOG_NAME
|
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. |
protected static String |
DEFAULT_SCHEMA_NAME
|
protected static String |
DEFAULT_WORKSPACE
|
protected static String |
DRIVER_CLASS_NAME
|
protected static String |
DRIVER_CLASSLOADER_NAME
|
protected static String |
IDLE_TIME_IN_SECONDS_BEFORE_TESTING_CONNECTIONS
|
protected static String |
MAXIMUM_CONNECTION_IDLE_TIME_IN_SECONDS
|
protected static String |
MAXIMUM_CONNECTIONS_IN_POOL
|
protected static String |
MAXIMUM_SIZE_OF_STATEMENT_CACHE
|
protected static String |
METADATA_COLLECTOR_CLASS_NAME
|
protected static String |
MINIMUM_CONNECTIONS_IN_POOL
|
protected static String |
NUMBER_OF_CONNECTIONS_TO_BE_ACQUIRED_AS_NEEDED
|
protected static String |
PASSWORD
|
protected static String |
RETRY_LIMIT
|
protected static String |
ROOT_NODE_UUID
|
protected static String |
SOURCE_NAME
|
static boolean |
SUPPORTS_CREATING_WORKSPACES
This source does not support creating workspaces. |
protected static boolean |
SUPPORTS_EVENTS
This source does not support events. |
protected static boolean |
SUPPORTS_REFERENCES
This source does not support creating references. |
protected static boolean |
SUPPORTS_SAME_NAME_SIBLINGS
This source does support same-name-siblings for procedure nodes. |
static boolean |
SUPPORTS_UPDATES
This source does not support updates. |
protected static String |
URL
|
protected static String |
USERNAME
|
Fields inherited from class org.modeshape.graph.connector.base.AbstractNodeCachingRepositorySource |
---|
DEFAULT_NODE_CACHE_POLICY, NODE_CACHE_POLICY |
Fields inherited from class org.modeshape.graph.connector.base.AbstractRepositorySource |
---|
cachePolicy, DEFAULT_CACHE_POLICY, DEFAULT_RETRY_LIMIT, DEFAULT_ROOT_NODE_UUID, repositoryContext, retryLimit, rootNodeUuid |
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.modeshape.graph.connector.base.AbstractNodeCachingRepositorySource |
---|
addNodeCachePolicyChangedListener, addNodeCachePolicyReference, getNodeCachePolicy, removeNodeCachePolicyChangedListener, setNodeCachePolicy |
Methods inherited from class org.modeshape.graph.connector.base.AbstractRepositorySource |
---|
areUpdatesAllowed, getDefaultCachePolicy, getName, getRepositoryContext, getRetryLimit, getRootNodeUuid, getRootNodeUuidObject, initialize, isCreatingWorkspacesAllowed, setCachePolicy, setName, setRetryLimit, setRootNodeUuid, setRootNodeUuidObject, valuesFrom |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String SOURCE_NAME
protected static final String CACHE_POLICY
protected static final String ROOT_NODE_UUID
protected static final String DATA_SOURCE_JNDI_NAME
protected static final String USERNAME
protected static final String PASSWORD
protected static final String URL
protected static final String DRIVER_CLASS_NAME
protected static final String DRIVER_CLASSLOADER_NAME
protected static final String MAXIMUM_CONNECTIONS_IN_POOL
protected static final String MINIMUM_CONNECTIONS_IN_POOL
protected static final String MAXIMUM_CONNECTION_IDLE_TIME_IN_SECONDS
protected static final String MAXIMUM_SIZE_OF_STATEMENT_CACHE
protected static final String NUMBER_OF_CONNECTIONS_TO_BE_ACQUIRED_AS_NEEDED
protected static final String IDLE_TIME_IN_SECONDS_BEFORE_TESTING_CONNECTIONS
protected static final String RETRY_LIMIT
protected static final String DEFAULT_WORKSPACE
protected static final String DEFAULT_CATALOG_NAME
protected static final String DEFAULT_SCHEMA_NAME
protected static final String METADATA_COLLECTOR_CLASS_NAME
protected static final boolean SUPPORTS_EVENTS
protected static final boolean SUPPORTS_SAME_NAME_SIBLINGS
protected static final boolean SUPPORTS_REFERENCES
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()
AbstractRepositorySource
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 AbstractRepositorySource
RepositorySource.close()
public RepositorySourceCapabilities getCapabilities()
getCapabilities
in interface RepositorySource
RepositorySource.getCapabilities()
public RepositoryConnection getConnection() throws RepositorySourceException
getConnection
in interface RepositorySource
RepositorySourceException
- if there is a problem obtaining a connectionRepositorySource.getConnection()
public Reference getReference()
getReference
in interface Referenceable
Referenceable.getReference()
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance
in interface ObjectFactory
Exception
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context,
java.util.Hashtable)
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 BaseRepositorySource
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 BaseRepositorySource
updatesAllowed
- must be true
RepositorySourceException
- if updatesAllowed != true
.BaseRepositorySource.areUpdatesAllowed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |