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 SchemaHandler
public void validateSchema()
SchemaHandler
validateSchema
in interface SchemaHandler
public void storeEvent(PersistableEvent pe, Connection connection)
SchemaHandler
storeEvent
in interface SchemaHandler
pe
- the event to persistconnection
- the connection to usepublic PersistableEvent fetchAndDeleteEvent(String channel, Connection connection)
SchemaHandler
fetchAndDeleteEvent
in interface SchemaHandler
channel
- the channel name from which event will be retrievedconnection
- the connection to usepublic long getChannelSize(Connection connection)
SchemaHandler
getChannelSize
in interface SchemaHandler
public void createSchemaObjects(boolean createForeignKeys, boolean createIndex)
SchemaHandler
createSchemaObjects
in interface SchemaHandler
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.Copyright © 2009–2019 Apache Software Foundation. All rights reserved.