Package com.jcabi.mysql.maven.plugin
Class Instances
- java.lang.Object
-
- com.jcabi.mysql.maven.plugin.Instances
-
@Loggable(2) public final class Instances extends Object
Running instances of MySQL.The class is thread-safe.
- Since:
- 0.1
- Suppressed Checkstyle violations:
- ClassDataAbstractionCoupling (500 lines), MultipleStringLiterals (500 lines)
-
-
Constructor Summary
Constructors Constructor Description Instances()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanreusedExistingDatabase()Returns if a clean database had to be created.voidstart(@NotNull Config config, @NotNull File dist, @NotNull File target, boolean deldir, File socket)Start a new one at this port.voidstop(int port)Stop a running one at this port.
-
-
-
Method Detail
-
start
public void start(@NotNull @NotNull Config config, @NotNull @NotNull File dist, @NotNull @NotNull File target, boolean deldir, File socket) throws IOExceptionStart a new one at this port.- Parameters:
config- Instance configurationdist- Path to MySQL distributiontarget- Where to keep temp datadeldir- If existing DB should be deletedsocket- Alternative socket location for mysql (may be null)- Throws:
IOException- If fails to start- Suppressed Checkstyle violations:
- ParameterNumberCheck (10 lines)
-
stop
public void stop(int port)
Stop a running one at this port.- Parameters:
port- The port to stop at
-
reusedExistingDatabase
public boolean reusedExistingDatabase()
Returns if a clean database had to be created. Note that this must be called afterInstances#start(Config, File, File, boolean).- Returns:
- If this is a clean database or could have been reused
-
-