/** * @param alias Class alias. * @return Deployed class. */ @Nullable private GridDeployment getDeployment(String alias) { assert Thread.holdsLock(mux); LinkedList<GridDeployment> deps = cache.get(alias); if (deps != null) { assert !deps.isEmpty(); GridDeployment dep = deps.getFirst(); if (!dep.isUndeployed()) { return dep; } } return null; }
/** * Gets first element of this list. * * @return First element or {@code null} if list is empty. */ @Nullable public V first() { return vals.isEmpty() ? null : vals.getFirst(); }