public class MySQLSchemaHandler extends Object implements SchemaHandler
| Modifier | Constructor and Description |
|---|---|
protected |
MySQLSchemaHandler(DataSource dataSource) |
| 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.
|
protected MySQLSchemaHandler(DataSource dataSource)
public boolean schemaExists()
schemaExists in interface SchemaHandlerpublic void validateSchema()
SchemaHandlervalidateSchema in interface SchemaHandlerpublic void storeEvent(PersistableEvent pe, Connection connection)
SchemaHandlerstoreEvent in interface SchemaHandlerpe - the event to persistconnection - the connection to usepublic PersistableEvent fetchAndDeleteEvent(String channel, Connection connection)
SchemaHandlerfetchAndDeleteEvent in interface SchemaHandlerchannel - the channel name from which event will be retrievedconnection - the connection to usepublic long getChannelSize(Connection connection)
SchemaHandlergetChannelSize in interface SchemaHandlerpublic void createSchemaObjects(boolean createForeignKeys,
boolean createIndex)
SchemaHandlercreateSchemaObjects in interface SchemaHandlercreateForeignKeys - 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.Copyright © 2009-2022 Apache Software Foundation. All Rights Reserved.