*/
@Start public void startup() {
int i = 0;
for (NameValuePair<Integer> myHostPort : myHostPorts) {
logger.fine("Starting memcached on " + myHostPort.name);
Command startCmd;
if (myHostPort.value != null) {
startCmd = new Command(memcachedStartCmd + " -p " +
myHostPort.value);
} else {
startCmd = new Command(memcachedStartCmd + " -p " +
DEFAULT_PORT);
}
startCmd.setLogLevel(Command.STDOUT, Level.INFO);
startCmd.setLogLevel(Command.STDERR, Level.INFO);
logger.fine("Starting memcached with: " + memcachedStartCmd);
startCmd.setSynchronous(false); // to run in bg
try {
// Run the command in the background
memcacheHandles[i] = RunContext.exec(myHostPort.name, startCmd);
logger.fine("Completed memcached server startup successfully on "
+ myHostPort.name);