net.corda.node.utilities

## Class JDBCHashSet<K>

- AbstractJDBCHashSet
- - net.corda.node.utilities.JDBCHashSet<K>

-     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.

  See Also:
    `class AbstractJDBCHashSet`, `class AbstractJDBCHashMap`, `class AbstractJDBCHashSet`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JDBCHashSet.BlobSetTable`

  - ### Constructor Summary

    Constructors
    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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class net.corda.node.utilities.AbstractJDBCHashSet

      `add, addElementToInsert, clear, contains, elementFromRow, getInnerMap, getSize, getTable, isEmpty, iterator, remove, size`

- - ### Constructor Detail

    - #### JDBCHashSet

          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.

      See Also:
        `class AbstractJDBCHashSet`, `class AbstractJDBCHashMap`, `class AbstractJDBCHashSet`

  - ### Method Detail

    - #### elementFromRow

          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`.

      See Also:
        `class JDBCHashSet`

    - #### addElementToInsert

          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`.

      See Also:
        `class JDBCHashSet`