Class GenericTokenTableFactory

java.lang.Object
org.axonframework.eventhandling.tokenstore.jdbc.GenericTokenTableFactory
All Implemented Interfaces:
TokenTableFactory
Direct Known Subclasses:
PostgresTokenTableFactory

public class GenericTokenTableFactory extends Object implements TokenTableFactory
Jdbc token entry table factory compatible with most databases.
Author:
Rene de Waele
  • Field Details

    • INSTANCE

      public static final GenericTokenTableFactory INSTANCE
      Creates a singleton reference the the GenericTokenTableFactory implementation.
  • Constructor Details

    • GenericTokenTableFactory

      protected GenericTokenTableFactory()
  • Method Details

    • createTable

      public PreparedStatement createTable(Connection connection, TokenSchema schema) throws SQLException
      Description copied from interface: TokenTableFactory
      Creates a PreparedStatement that allows for the creation of the table to store tracking token entries.
      Specified by:
      createTable in interface TokenTableFactory
      Parameters:
      connection - The connection to create the PreparedStatement for
      schema - The token schema with the name of the table and its columns
      Returns:
      The statement to create the table, ready to be executed
      Throws:
      SQLException - when an exception occurs while creating the prepared statement
    • tokenType

      protected String tokenType()
      Returns the sql to describe the type of token column.
      Returns:
      the sql for the token column