Class PostgresBlobStore
- java.lang.Object
-
- org.opennms.features.distributed.kvstore.api.AbstractKeyValueStore<T>
-
- org.opennms.features.distributed.kvstore.api.AbstractAsyncKeyValueStore<T>
-
- org.opennms.features.distributed.kvstore.pgshared.AbstractPostgresKeyValueStore<byte[],byte[]>
-
- org.opennms.features.distributed.kvstore.blob.postgres.PostgresBlobStore
-
- All Implemented Interfaces:
BlobStore
,KeyValueStore<byte[]>
public class PostgresBlobStore extends AbstractPostgresKeyValueStore<byte[],byte[]> implements BlobStore
-
-
Constructor Summary
Constructors Constructor Description PostgresBlobStore(javax.sql.DataSource dataSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getPkConstraintName()
protected java.lang.String
getTableName()
protected byte[]
getValueTypeFromSQLType(java.sql.ResultSet resultSet, java.lang.String columnName)
Sub classes must override this method to provide handling for converting from the JDBC result to type T.-
Methods inherited from class org.opennms.features.distributed.kvstore.pgshared.AbstractPostgresKeyValueStore
delete, enumerateContext, get, getIfStale, getLastUpdated, getName, getSQLTypeFromValueType, getValueStatementPlaceholder, put, truncateContext
-
Methods inherited from class org.opennms.features.distributed.kvstore.api.AbstractAsyncKeyValueStore
deleteAsync, enumerateContextAsync, getAsync, getIfStaleAsync, getLastUpdatedAsync, putAsync, truncateContextAsync
-
Methods inherited from class org.opennms.features.distributed.kvstore.api.AbstractKeyValueStore
put, putAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.features.distributed.kvstore.api.KeyValueStore
delete, deleteAsync, enumerateContext, enumerateContextAsync, get, getAsync, getIfStale, getIfStaleAsync, getLastUpdated, getLastUpdatedAsync, getName, put, put, putAsync, putAsync, truncateContext, truncateContextAsync
-
-
-
-
Method Detail
-
getValueTypeFromSQLType
protected byte[] getValueTypeFromSQLType(java.sql.ResultSet resultSet, java.lang.String columnName) throws java.sql.SQLException
Description copied from class:AbstractPostgresKeyValueStore
Sub classes must override this method to provide handling for converting from the JDBC result to type T.- Specified by:
getValueTypeFromSQLType
in classAbstractPostgresKeyValueStore<byte[],byte[]>
- Throws:
java.sql.SQLException
-
getTableName
protected java.lang.String getTableName()
- Specified by:
getTableName
in classAbstractPostgresKeyValueStore<byte[],byte[]>
- Returns:
- the name of the table for this store
-
getPkConstraintName
protected java.lang.String getPkConstraintName()
- Specified by:
getPkConstraintName
in classAbstractPostgresKeyValueStore<byte[],byte[]>
- Returns:
- the name of the primary key constraint for the table this store persists to
-
-