public abstract class CommandPool<I,O> extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
bufSize |
protected List<String> |
cmdArray |
protected String |
cmdLine |
protected BlockingQueue<Command<I,O>> |
cmdPool |
protected int |
initPoolSize |
protected AtomicInteger |
numCmd |
protected int |
pollTimeOut |
protected int |
poolSize |
protected int |
restartWait |
protected int |
startWait |
protected int |
timeOut |
Constructor and Description |
---|
CommandPool(String cmdLine,
List<String> cmdArray,
String directory,
Map<String,String> environment,
String delimiterIn,
String delimiterOut,
boolean useEnvLineSeparator,
boolean delLastNewline,
boolean includeDelim,
int timeOut,
int startWait,
int restartWait,
int bufSize,
int pollTimeOut,
int poolSize,
int initPoolSize) |
Modifier and Type | Method and Description |
---|---|
abstract Command<I,O> |
getInstance() |
Command<I,O> |
getInstance(Class<? extends Command<I,O>> cmdClass) |
int |
getMaxPoolSize() |
int |
getPooledSize() |
int |
getPoolingSize() |
void |
init() |
void |
returnInstance(Command<I,O> cmd) |
protected final AtomicInteger numCmd
protected BlockingQueue<Command<I,O>> cmdPool
protected String cmdLine
protected int timeOut
protected int startWait
protected int restartWait
protected int bufSize
protected int pollTimeOut
protected int poolSize
protected int initPoolSize
public CommandPool(String cmdLine, List<String> cmdArray, String directory, Map<String,String> environment, String delimiterIn, String delimiterOut, boolean useEnvLineSeparator, boolean delLastNewline, boolean includeDelim, int timeOut, int startWait, int restartWait, int bufSize, int pollTimeOut, int poolSize, int initPoolSize)
public int getPooledSize()
public int getMaxPoolSize()
public int getPoolingSize()
public abstract Command<I,O> getInstance() throws IOException, InterruptedException
IOException
InterruptedException
public Command<I,O> getInstance(Class<? extends Command<I,O>> cmdClass) throws IOException, InterruptedException
IOException
InterruptedException
public void init()
Copyright (C) 2014 Information Analysis Laboratory, NICT
RaSC is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.
RaSC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see (http://www.gnu.org/licenses/) .