Top Inners Fields Constructors Methods
liquibase.executor

public Class ExecutorService

extends AbstractPluginFactory<Executor>
Class Inheritance
Imports
liquibase.database.Database, liquibase.exception.UnexpectedLiquibaseException, liquibase.plugin.AbstractPluginFactory, .Plugin, java.util.*, java.util.concurrent.ConcurrentHashMap

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final Map<ExecutorService.Key, Executor>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
clearExecutor(Database database)
Deprecated Please use clearExecutor(name, database)

public void
clearExecutor(String name, Database database)

private ExecutorService.Key
createKey(String executorName, Database database)

public boolean

Returns:

true if an executor exists for the given name and database, false otherwise
executorExists
(final String
the name of the executor
name
,
final Database
the database to which the executor is connected
database
)

Checks if an executor exists for the given name and database.

public Executor

Returns:

the Executor associated with the given name and database
getExecutor
(final String
the name of the executor
name
,
final Database
the database for which to retrieve the executor
database
)

Retrieves a named executor for the specified database.

public Executor

Returns:

Executor for the specified database and name
getExecutor
(Database
the Database to execute the statements on
database
)
Deprecated Please use getExecutor(String, Database) instead.

Returns an Executor for the specified database and name.

private Executor
getExecutorValue(String executorName, Database database)

protected Class<Executor>
protected int
getPriority(Executor executor, Object... args)

Implements abstract liquibase.plugin.AbstractPluginFactory.getPriority.

Returns the priority of the given object based on the passed args array.

public void
public void
setExecutor(Database
the Database for which the executor is set
database
,
Executor
the Executor to set
executor
)

Sets the executor for the given database with the default name "jdbc".

public void
setExecutor(String name, Database database, Executor executor)

Inherited from liquibase.plugin.AbstractPluginFactory:
findAllInstancesgetPlugingetPluginsregisterremoveInstance

Field Detail

executorsback to summary
private final Map<ExecutorService.Key, Executor> executors

Constructor Detail

ExecutorServiceback to summary
private ExecutorService()

Method Detail

clearExecutorback to summary
public void clearExecutor(Database database)

Deprecated

Please use clearExecutor(name, database)

clearExecutorback to summary
public void clearExecutor(String name, Database database)
createKeyback to summary
private ExecutorService.Key createKey(String executorName, Database database)
executorExistsback to summary
public boolean executorExists(final String name, final Database database)

Checks if an executor exists for the given name and database.

Parameters
name:String

the name of the executor

database:Database

the database to which the executor is connected

Returns:boolean

true if an executor exists for the given name and database, false otherwise

getExecutorback to summary
public Executor getExecutor(final String name, final Database database)

Retrieves a named executor for the specified database.

Parameters
name:String

the name of the executor

database:Database

the database for which to retrieve the executor

Returns:Executor

the Executor associated with the given name and database

Exceptions
UnexpectedLiquibaseException:
if there was an error retrieving the executor
getExecutorback to summary
public Executor getExecutor(Database database)

Deprecated

Please use getExecutor(String, Database) instead.

Returns an Executor for the specified database and name. This method is deprecated; please use getExecutor(String, Database) instead.

Parameters
database:Database

the Database to execute the statements on

Returns:Executor

Executor for the specified database and name

getExecutorValueback to summary
private Executor getExecutorValue(String executorName, Database database) throws UnexpectedLiquibaseException
getPluginClassback to summary
protected Class<Executor> getPluginClass()

Implements abstract liquibase.plugin.AbstractPluginFactory.getPluginClass.

Annotations
@Override
getPriorityback to summary
protected int getPriority(Executor executor, Object... args)

Implements abstract liquibase.plugin.AbstractPluginFactory.getPriority.

Doc from liquibase.plugin.AbstractPluginFactory.getPriority.

Returns 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 through getPlugin(Object...)

Annotations
@Override
resetback to summary
public void reset()
setExecutorback to summary
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:Database

the Database for which the executor is set

executor:Executor

the Executor to set

setExecutorback to summary
public void setExecutor(String name, Database database, Executor executor)
liquibase.executor back to summary

private Class ExecutorService.Key

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Database
private final String

Constructor Summary

AccessConstructor and Description
pack-priv
Key(String executorName, Database database)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

databaseback to summary
private final Database database
executorNameback to summary
private final String executorName

Constructor Detail

Keyback to summary
pack-priv Key(String executorName, Database database)

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
normalizeExecutorNameback to summary
private String normalizeExecutorName(String executorName)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override