Package liquibase.executor
Class ExecutorService
- java.lang.Object
-
- liquibase.plugin.AbstractPluginFactory<Executor>
-
- liquibase.executor.ExecutorService
-
- All Implemented Interfaces:
PluginFactory,SingletonObject
public class ExecutorService extends AbstractPluginFactory<Executor>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearExecutor(String name, Database database)voidclearExecutor(Database database)Deprecated.Please use clearExecutor(name, database)booleanexecutorExists(String name, Database database)Checks if an executor exists for the given name and database.ExecutorgetExecutor(String name, Database database)Retrieves a named executor for the specified database.ExecutorgetExecutor(Database database)Deprecated.Please usegetExecutor(String, Database)instead.protected Class<Executor>getPluginClass()protected intgetPriority(Executor executor, Object... args)Returns the priority of the given object based on the passed args array.voidreset()voidsetExecutor(String name, Database database, Executor executor)voidsetExecutor(Database database, Executor executor)Sets the executor for the given database with the default name "jdbc".-
Methods inherited from class liquibase.plugin.AbstractPluginFactory
findAllInstances, getPlugin, getPlugins, register, removeInstance
-
-
-
-
Method Detail
-
getPluginClass
protected Class<Executor> getPluginClass()
- Specified by:
getPluginClassin classAbstractPluginFactory<Executor>
-
getPriority
protected int getPriority(Executor executor, Object... args)
Description copied from class:AbstractPluginFactoryReturns the priority of the given object based on the passed args array. The args are created as part of the custom public getPlugin method in implementations are passed throughAbstractPluginFactory.getPlugin(Object...)- Specified by:
getPriorityin classAbstractPluginFactory<Executor>
-
getExecutor
public Executor getExecutor(String name, Database database)
Retrieves a named executor for the specified database.- Parameters:
name- the name of the executordatabase- the database for which to retrieve the executor- Returns:
- the
Executorassociated with the given name and database - Throws:
UnexpectedLiquibaseException- if there was an error retrieving the executor
-
executorExists
public boolean executorExists(String name, Database database)
Checks if an executor exists for the given name and database.- Parameters:
name- the name of the executordatabase- the database to which the executor is connected- Returns:
trueif an executor exists for the given name and database,falseotherwise
-
getExecutor
public Executor getExecutor(Database database)
Deprecated.Please usegetExecutor(String, Database)instead.Returns anExecutorfor the specified database and name. This method is deprecated; please usegetExecutor(String, Database)instead.- Parameters:
database- theDatabaseto execute the statements on- Returns:
Executorfor the specified database and name
-
setExecutor
public void setExecutor(Database database, Executor executor)
Sets the executor for the given database with the default name "jdbc". If an executor with the same name and database already exists, it will be replaced by the new one.- Parameters:
database- theDatabasefor which the executor is setexecutor- theExecutorto set
-
clearExecutor
public void clearExecutor(Database database)
Deprecated.Please use clearExecutor(name, database)- Parameters:
database-
-
reset
public void reset()
-
-