public class JDBCHashSet<K>
extends AbstractJDBCHashSet
A convenient JDBC table backed hash set with iteration order based on insertion order.
See class AbstractJDBCHashSet
and class AbstractJDBCHashMap
for further implementation details.
In this subclass, elements are represented by Blobs of Kryo serialized forms of the element objects.
If you can extend class AbstractJDBCHashSet
and implement less Kryo dependent element mappings then that is
likely preferrable.
Modifier and Type | Class and Description |
---|---|
static class |
JDBCHashSet.BlobSetTable |
Constructor and Description |
---|
JDBCHashSet(java.lang.String tableName,
boolean loadOnInit,
int maxBuckets)
A convenient JDBC table backed hash set with iteration order based on insertion order.
See
class AbstractJDBCHashSet and class AbstractJDBCHashMap for further implementation details. |
Modifier and Type | Method and Description |
---|---|
void |
addElementToInsert(org.jetbrains.exposed.sql.statements.InsertStatement insert,
K entry,
java.util.List<kotlin.jvm.functions.Function0> finalizables)
Implementation should marshall the element to the insert statement.
|
K |
elementFromRow(org.jetbrains.exposed.sql.ResultRow row)
Implementation should return the element object marshalled from the database table row.
|
add, addElementToInsert, clear, contains, elementFromRow, getInnerMap, getSize, getTable, isEmpty, iterator, remove, size
public JDBCHashSet(java.lang.String tableName, boolean loadOnInit, int maxBuckets)
A convenient JDBC table backed hash set with iteration order based on insertion order.
See class AbstractJDBCHashSet
and class AbstractJDBCHashMap
for further implementation details.
In this subclass, elements are represented by Blobs of Kryo serialized forms of the element objects.
If you can extend class AbstractJDBCHashSet
and implement less Kryo dependent element mappings then that is
likely preferrable.
public K elementFromRow(org.jetbrains.exposed.sql.ResultRow row)
Implementation should return the element object marshalled from the database table row.
See example implementations in class JDBCHashSet
.
class JDBCHashSet
public void addElementToInsert(org.jetbrains.exposed.sql.statements.InsertStatement insert, K entry, java.util.List<kotlin.jvm.functions.Function0> finalizables)
Implementation should marshall the element to the insert statement.
If some cleanup is required after the insert statement is executed, such as closing a Blob, then add a closure to the finalizables to do so.
See example implementations in class JDBCHashSet
.
class JDBCHashSet