public interface SchemaHandler
A handler for creating and validating database schema for use by the JDBC channel implementation.
Modifier and Type | Method and Description |
---|---|
void |
createSchemaObjects(boolean createForeignKeys,
boolean createIndex)
Creates the schema.
|
PersistableEvent |
fetchAndDeleteEvent(String channel,
Connection connection)
Retrieves the next persistent event from the database.
|
long |
getChannelSize(Connection connection)
Returns the current size of the channel using the connection specified that
must have an active transaction ongoing.
|
boolean |
schemaExists() |
void |
storeEvent(PersistableEvent pe,
Connection connection)
Inserts the given persistent event into the database.
|
void |
validateSchema()
Validates the schema.
|
boolean schemaExists()
void validateSchema()
void createSchemaObjects(boolean createForeignKeys, boolean createIndex)
createForeignKeys
- a flag which indicates if the foreign key
constraints should be created where necessary.createIndex
- a flag which indicates if indexes must be created during
the creation of the schema.void storeEvent(PersistableEvent pe, Connection connection)
pe
- the event to persistconnection
- the connection to usePersistableEvent fetchAndDeleteEvent(String channel, Connection connection)
channel
- the channel name from which event will be retrievedconnection
- the connection to uselong getChannelSize(Connection connection)
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.