public abstract class PicodataBaseDataSource extends Object implements CommonDataSource
Constructor and Description |
---|
PicodataBaseDataSource() |
protected Properties getProperties()
public PrintWriter getLogWriter()
getLogWriter
in interface CommonDataSource
public void setLogWriter(PrintWriter printWriter)
setLogWriter
in interface CommonDataSource
printWriter
- Not usedpublic int getLoginTimeout()
getLoginTimeout
in interface CommonDataSource
PicodataProperty.LOGIN_TIMEOUT
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface CommonDataSource
PicodataProperty.LOGIN_TIMEOUT
public Logger getParentLogger()
getParentLogger
in interface CommonDataSource
public abstract String getDescription()
public Connection getConnection() throws SQLException
SQLException
- Occurs when the database connection cannot be established.public Connection getConnection(String user, String password) throws SQLException
user
- userpassword
- passwordSQLException
- Occurs when the database connection cannot be established.public void setPorts(List<Integer> ports)
localhost
.ports
- Picodata server port(s)public List<Integer> getPorts()
public void setHosts(List<String> hosts)
localhost
.hosts
- Picodata server hostname(s)public List<String> getHosts()
public String getUser()
PicodataProperty.PICODATA_USER
public void setUser(String username)
username
- user for connecting to Picodata serverPicodataProperty.PICODATA_USER
public String getPassword()
PicodataProperty.PICODATA_PASSWORD
public void setPassword(String password)
password
- password for connecting to Picodata serverPicodataProperty.PICODATA_PASSWORD
public int getConnectTimeout()
PicodataProperty.CONNECT_TIMEOUT
public void setConnectTimeout(int seconds)
seconds
- connect timeoutPicodataProperty.CONNECT_TIMEOUT
public int getReceiveBufferSize()
PicodataProperty.RECEIVE_BUFFER_SIZE
public void setReceiveBufferSize(int nbytes)
nbytes
- receive buffer sizePicodataProperty.RECEIVE_BUFFER_SIZE
public int getSendBufferSize()
PicodataProperty.SEND_BUFFER_SIZE
public void setSendBufferSize(int nbytes)
nbytes
- send buffer sizePicodataProperty.SEND_BUFFER_SIZE
public void setPrepareThreshold(int count)
count
- prepare thresholdPicodataProperty.PREPARE_THRESHOLD
public int getPrepareThreshold()
PicodataProperty.PREPARE_THRESHOLD
public int getPreparedStatementCacheQueries()
PicodataProperty.PREPARED_STATEMENT_CACHE_QUERIES
public void setPreparedStatementCacheQueries(int cacheSize)
cacheSize
- prepared statement cache size (number of statements per connection)PicodataProperty.PREPARED_STATEMENT_CACHE_QUERIES
public int getPreparedStatementCacheSizeMiB()
PicodataProperty.PREPARED_STATEMENT_CACHE_SIZE_MIB
public void setPreparedStatementCacheSizeMiB(int cacheSize)
cacheSize
- statement cache size (number of megabytes per connection)PicodataProperty.PREPARED_STATEMENT_CACHE_SIZE_MIB
public int getDatabaseMetadataCacheFields()
PicodataProperty.DATABASE_METADATA_CACHE_FIELDS
public void setDatabaseMetadataCacheFields(int cacheSize)
cacheSize
- database metadata cache fields size (number of fields cached per connection)PicodataProperty.DATABASE_METADATA_CACHE_FIELDS
public int getDatabaseMetadataCacheFieldsMiB()
PicodataProperty.DATABASE_METADATA_CACHE_FIELDS_MIB
public void setDatabaseMetadataCacheFieldsMiB(int cacheSize)
cacheSize
- database metadata cache fields size (number of megabytes per connection)PicodataProperty.DATABASE_METADATA_CACHE_FIELDS_MIB
public void setDefaultRowFetchSize(int fetchSize)
fetchSize
- default fetch sizePicodataProperty.DEFAULT_ROW_FETCH_SIZE
public int getDefaultRowFetchSize()
PicodataProperty.DEFAULT_ROW_FETCH_SIZE
public void setUnknownLength(int unknownLength)
unknownLength
- unknown lengthPicodataProperty.UNKNOWN_LENGTH
public int getUnknownLength()
PicodataProperty.UNKNOWN_LENGTH
public void setSocketTimeout(int seconds)
seconds
- socket timeoutPicodataProperty.SOCKET_TIMEOUT
public int getSocketTimeout()
PicodataProperty.SOCKET_TIMEOUT
public void setCancelSignalTimeout(int seconds)
seconds
- timeout that is used for sending cancel commandPicodataProperty.CANCEL_SIGNAL_TIMEOUT
public int getCancelSignalTimeout()
PicodataProperty.CANCEL_SIGNAL_TIMEOUT
public void setApplicationName(String applicationName)
applicationName
- application namePicodataProperty.APPLICATION_NAME
public String getApplicationName()
PicodataProperty.APPLICATION_NAME
public void setTcpKeepAlive(boolean enabled)
enabled
- if TCP keep alive should be enabledPicodataProperty.TCP_KEEP_ALIVE
public boolean getTcpKeepAlive()
PicodataProperty.TCP_KEEP_ALIVE
public void setTcpNoDelay(boolean enabled)
enabled
- if TCP no delay should be enabledPicodataProperty.TCP_NO_DELAY
public boolean getTcpNoDelay()
PicodataProperty.TCP_NO_DELAY
public boolean getReadOnly()
PicodataProperty.READ_ONLY
public void setReadOnly(boolean readOnly)
readOnly
- if connection should be readonlyPicodataProperty.READ_ONLY
public String getReadOnlyMode()
PicodataProperty.READ_ONLY_MODE
public void setReadOnlyMode(String mode)
mode
- the behavior when set read onlyPicodataProperty.READ_ONLY_MODE
public boolean getLogServerErrorDetail()
PicodataProperty.LOG_SERVER_ERROR_DETAIL
public void setLogServerErrorDetail(boolean enabled)
enabled
- true if driver should include detail in server error messagesPicodataProperty.LOG_SERVER_ERROR_DETAIL
public String getSocketFactory()
PicodataProperty.SOCKET_FACTORY
public void setSocketFactory(String socketFactoryClassName)
socketFactoryClassName
- socket factory class namePicodataProperty.SOCKET_FACTORY
public String getLocalSocketAddress()
PicodataProperty.LOCAL_SOCKET_ADDRESS
public void setLocalSocketAddress(String localSocketAddress)
localSocketAddress
- local address to bind client side toPicodataProperty.LOCAL_SOCKET_ADDRESS
public boolean getReWriteBatchedInserts()
PicodataProperty.REWRITE_BATCHED_INSERTS
public void setReWriteBatchedInserts(boolean reWrite)
reWrite
- boolean value to set the property in the properties collectionPicodataProperty.REWRITE_BATCHED_INSERTS
public boolean getHideUnprivilegedObjects()
PicodataProperty.HIDE_UNPRIVILEGED_OBJECTS
public void setHideUnprivilegedObjects(boolean hideUnprivileged)
hideUnprivileged
- boolean value to set the property in the properties collectionPicodataProperty.HIDE_UNPRIVILEGED_OBJECTS
public String getMaxResultBuffer()
PicodataProperty.MAX_RESULT_BUFFER
public void setMaxResultBuffer(String maxResultBuffer)
maxResultBuffer
- new valuePicodataProperty.MAX_RESULT_BUFFER
protected String internalGetURL(String user, String password) throws SQLException
SQLException
public String getURL()
DriverManager
URL from the other properties supplied.DriverManager
URL from the other properties suppliedpublic void setURL(String url)
DriverManager
URL.url
- properties to setIllegalArgumentException
- if the passed URL cannot be parsedpublic String getProperty(String name) throws SQLException
SQLException
public void setProperty(String name, String value) throws SQLException
SQLException
public String getProperty(PicodataProperty property)
public void setProperty(PicodataProperty property, String value)
protected void writeBaseObject(ObjectOutputStream out) throws IOException
IOException
protected void readBaseObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2025 Picodata. All rights reserved.