use of org.dcache.cells.CellStub in project dcache by dCache.
the class LineBasedDoorFactory method doStart.
@Override
protected void doStart() {
executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat(parentCellName + "-io-%d").build());
poolManagerHandler = new PoolManagerHandlerSubscriber();
poolManagerHandler.setPoolManager(new CellStub(parentEndpoint, poolManager, poolManagerTimeout, poolManagerTimeoutUnit));
poolManagerHandler.start();
poolManagerHandler.afterStart();
notifyStarted();
}
use of org.dcache.cells.CellStub in project dcache by dCache.
the class NettyLineBasedDoorFactory method doStart.
@Override
protected void doStart() {
executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat(parentCellName + "-%d").build());
CellStub spaceManager = new CellStub(parentEndpoint, spaceManagerPath, 30_000);
spaceDescriptionCache = ReservationCaches.buildOwnerDescriptionLookupCache(spaceManager, executor);
spaceLookupCache = ReservationCaches.buildSpaceLookupCache(spaceManager, executor);
LoginStrategy loginStrategy = new RemoteLoginStrategy(new CellStub(parentEndpoint, gPlazma, 30_000));
idResolverFactory = new IdentityResolverFactory(loginStrategy);
poolManagerHandler = new PoolManagerHandlerSubscriber();
poolManagerHandler.setPoolManager(new CellStub(parentEndpoint, poolManager, poolManagerTimeout, poolManagerTimeoutUnit));
poolManagerHandler.start();
poolManagerHandler.afterStart();
socketGroup = new NioEventLoopGroup(0, new CDCThreadFactory(new ThreadFactoryBuilder().setNameFormat(parentCellName + "-io-%d").build()));
notifyStarted();
}
use of org.dcache.cells.CellStub in project dcache by dCache.
the class PnfsManagerV3 method init.
public void init() {
_stub = new CellStub(getCellEndpoint());
_fifos = new BlockingQueue[_threads];
LOGGER.info("Starting {} threads", _fifos.length);
for (int i = 0; i < _fifos.length; i++) {
if (_queueMaxSize > 0) {
_fifos[i] = new LinkedBlockingQueue<>(_queueMaxSize);
} else {
_fifos[i] = new LinkedBlockingQueue<>();
}
executor.execute(new ProcessThread(_fifos[i]));
}
/* Start a seperate queue for list operations. We use a shared queue,
* as list operations are read only and thus there is no need
* to serialize the operations.
*/
_listQueue = new LinkedBlockingQueue<>();
for (int j = 0; j < _listThreads; j++) {
ProcessThread t = new ProcessThread(_listQueue);
_listProcessThreads.add(t);
executor.execute(t);
}
}
use of org.dcache.cells.CellStub in project dcache by dCache.
the class PoolStatisticsV0 method starting.
@Override
protected void starting() throws Exception {
Args args = getArgs();
if (args.argc() < 1) {
throw new IllegalArgumentException("Usage : ... <baseDirectory> " + "[-htmlBase=<htmlBase>|none] [-create] [-images=<images>]");
}
_poolManager = new CellStub(this, new CellPath(args.getOption("poolManager")), TimeUnit.MILLISECONDS.convert(args.getLongOption("poolManagerTimeout"), TimeUnit.valueOf(args.getOption("poolManagerTimeoutUnit"))));
_billing = new CellStub(this, new CellPath(args.getOption("billing")), TimeUnit.MILLISECONDS.convert(args.getLongOption("billingTimeout"), TimeUnit.valueOf(args.getOption("billingTimeoutUnit"))));
_poolStub = new CellStub(this, null, TimeUnit.MILLISECONDS.convert(args.getLongOption("poolTimeout"), TimeUnit.valueOf(args.getOption("poolTimeoutUnit"))));
_htmlBase = _dbBase = new File(args.argv(0));
String tmp = args.getOpt("htmlBase");
if ((tmp != null) && (!tmp.isEmpty())) {
if (tmp.equals("none")) {
_createHtmlTree = false;
} else {
_htmlBase = new File(tmp);
}
}
tmp = args.getOpt("domain");
if (tmp != null) {
_domainName = tmp;
}
if (args.hasOption("create")) {
if (!_dbBase.exists()) {
// noinspection ResultOfMethodCallIgnored
_dbBase.mkdirs();
}
if (_createHtmlTree && !_htmlBase.exists()) {
// noinspection ResultOfMethodCallIgnored
_htmlBase.mkdirs();
}
} else {
if ((!_dbBase.exists()) || (_createHtmlTree && !_htmlBase.exists())) {
throw new IllegalArgumentException("Either <baseDirectory> or <htmlBase> doesn't exist");
}
}
}
use of org.dcache.cells.CellStub in project dcache by dCache.
the class UserAdminShell method setCellEndpoint.
public void setCellEndpoint(CellEndpoint endpoint) {
_cellEndpoint = endpoint;
_cellStub = new CellStub(_cellEndpoint);
}
Aggregations