/** * Check whether GGFS with the same name exists among provided attributes. * * @param attrs Attributes. * @return {@code True} in case GGFS with the same name exists among provided attributes */ private boolean sameGgfs(GridGgfsAttributes[] attrs) { if (attrs != null) { String ggfsName = name(); for (GridGgfsAttributes attr : attrs) { if (F.eq(ggfsName, attr.ggfsName())) return true; } } return false; }
/** * Check whether GGFS with the same name exists among provided attributes. * * @param attrs Attributes. * @return {@code True} in case GGFS with the same name exists among provided attributes */ private boolean sameGgfs(GridGgfsAttributes[] attrs) { if (attrs != null) { String ggfsName = name(); for (GridGgfsAttributes attr : attrs) { if (F.eq(ggfsName, attr.ggfsName())) return true; } } return false; }
/** {@inheritDoc} */ @SuppressWarnings("ConstantConditions") @Override public GridGgfsStatus globalSpace() throws GridException { if (busyLock.enterBusy()) { try { GridBiTuple<Long, Long> space = ggfsCtx.kernalContext().grid().compute().execute( new GgfsGlobalSpaceTask(name()), null).get(); return new GridGgfsStatus(space.get1(), space.get2()); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get global space because Grid is stopping."); }
/** {@inheritDoc} */ @SuppressWarnings("ConstantConditions") @Override public GridGgfsStatus globalSpace() throws GridException { if (enterBusy()) { try { GridBiTuple<Long, Long> space = ggfsCtx.kernalContext().grid().compute().execute( new GgfsGlobalSpaceTask(name()), null).get(); return new GridGgfsStatus(space.get1(), space.get2()); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to get global space because Grid is stopping."); }