Class ConnectionSpecImpl
java.lang.Object
com.tangosol.coherence.transaction.ConnectionSpecImpl
- All Implemented Interfaces:
ConnectionFactory.ConnectionSpec
The connection spec implementation used to pass the connection info to
the connection request on the connection factory.
- Since:
- Coherence 3.7.1
- Author:
- tb 2011.08.16
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Get the class loader for which the configuration should be used.Get the configuration URI used to create the connection.Get thetransaction isolationfor this connection.Get the name of the service that will be associated with any connection obtained with this connection spec.intObtain the transaction timeout for this connection.Get the cache configuration inxml element formatused to create the connection.inthashCode()Returns a hash code value for the object.booleanGet the auto commit option.booleanisEager()Get the eager mode value.voidsetClassLoader(ClassLoader loader) Set the class loader for which the configuration should be used.voidsetCommitOption(boolean fCommitOption) Set the auto commit option.voidsetConfigURI(String sConfigURI) Set the configuration URI used to create the connection.voidsetEager(boolean fEager) Set the eager mode value.voidsetIsolation(Isolation isolation) Set the transaction isolation for the connection.voidsetServiceName(String sServiceName) Set the name of the service that will be associated with any connection obtained with this connection spec.voidsetTimeout(int nSeconds) Set the transactions timeout for the connection.voidsetXmlConfig(XmlElement xmlConfig) Set the cache configuration inxml element formatused to create the connection.
-
Constructor Details
-
ConnectionSpecImpl
public ConnectionSpecImpl()Constructor -
ConnectionSpecImpl
Constructor- Parameters:
sServiceName- the service to be associated with the connection
-
-
Method Details
-
getServiceName
Get the name of the service that will be associated with any connection obtained with this connection spec.- Specified by:
getServiceNamein interfaceConnectionFactory.ConnectionSpec- Returns:
- the name of the service
-
getConfigURI
Get the configuration URI used to create the connection.- Specified by:
getConfigURIin interfaceConnectionFactory.ConnectionSpec- Returns:
- the configuration URI
-
getXmlConfig
Get the cache configuration inxml element formatused to create the connection.- Specified by:
getXmlConfigin interfaceConnectionFactory.ConnectionSpec- Returns:
- the cache configuration in xml element format
-
getClassLoader
Get the class loader for which the configuration should be used.- Specified by:
getClassLoaderin interfaceConnectionFactory.ConnectionSpec- Returns:
- the class loader for which the configuration should be used
-
isAutoCommit
public boolean isAutoCommit()Get the auto commit option. This value determines how the auto commit option will be set on the Coherence connection when a connection is acquired from the adapter.- Specified by:
isAutoCommitin interfaceConnectionFactory.ConnectionSpec- Returns:
- the auto commit option
-
getIsolation
Get thetransaction isolationfor this connection.- Specified by:
getIsolationin interfaceConnectionFactory.ConnectionSpec- Returns:
- the transaction isolation
-
isEager
public boolean isEager()Get the eager mode value. The eager mode value determines whether or not operations will be performed eagerly. A value of false means that cache operations will potentially be delayed and submitted in batch form.- Specified by:
isEagerin interfaceConnectionFactory.ConnectionSpec- Returns:
- the eager mode
-
getTimeout
public int getTimeout()Obtain the transaction timeout for this connection.- Specified by:
getTimeoutin interfaceConnectionFactory.ConnectionSpec- Returns:
- the timeout in seconds
-
setServiceName
Set the name of the service that will be associated with any connection obtained with this connection spec.- Parameters:
sServiceName- the name of the service
-
setConfigURI
Set the configuration URI used to create the connection.- Parameters:
sConfigURI- the configuration URI
-
setXmlConfig
Set the cache configuration inxml element formatused to create the connection.- Parameters:
xmlConfig- the cache configuration in xml element format
-
setClassLoader
Set the class loader for which the configuration should be used.- Parameters:
loader- the class loader
-
setCommitOption
public void setCommitOption(boolean fCommitOption) Set the auto commit option. This value determines how the auto commit option will be set on the Coherence connection when a managed connection is acquired from the adapter.- Parameters:
fCommitOption- the auto commit option
-
setIsolation
Set the transaction isolation for the connection.- Parameters:
isolation- the transaction isolation
-
setEager
public void setEager(boolean fEager) Set the eager mode value. The eager mode determines whether or not operations will be performed eagerly.- Parameters:
fEager- the eager mode; false indicates that cache operations will potentially be delayed and submitted in batch form.
-
setTimeout
public void setTimeout(int nSeconds) Set the transactions timeout for the connection. A value of 0 means that the timeout value will not be set when the connection is obtained (the connection default timeout value will be used).- Parameters:
nSeconds- the timeout in seconds
-
hashCode
public int hashCode()Returns a hash code value for the object. -
equals
Indicates whether some other object is "equal to" this one.
-