/** {@inheritDoc} */ @Override public void stopListenAsync(@Nullable GridInClosure<? super GridFuture<R>>... lsnr) { if (F.isEmpty(lsnr)) synchronized (mux) { lsnrs.clear(); } else synchronized (mux) { lsnrs.removeAll(F.asList(lsnr)); } }
/** * Checks {@link GridSystemProperties#GG_JETTY_PORT} system property and overrides default * connector port if it present. Then initializes {@code port} with the found value. * * @param con Jetty connector. */ private void override(AbstractNetworkConnector con) { String host = System.getProperty(GG_JETTY_HOST); if (!F.isEmpty(host)) con.setHost(host); int currPort = con.getPort(); Integer overridePort = Integer.getInteger(GG_JETTY_PORT); if (overridePort != null && overridePort != 0) currPort = overridePort; con.setPort(currPort); port = currPort; }
/** {@inheritDoc} */ @Override public void prepareMarshal(GridCacheContext<K, V> ctx) throws GridException { super.prepareMarshal(ctx); if (err != null) errBytes = ctx.marshaller().marshal(err); metaDataBytes = marshalCollection(metadata, ctx); dataBytes = fields ? marshalFieldsCollection(data, ctx) : marshalCollection(data, ctx); if (ctx.deploymentEnabled() && !F.isEmpty(data)) { for (Object o : data) { if (o instanceof Map.Entry) { Map.Entry e = (Map.Entry) o; prepareObject(e.getKey(), ctx); prepareObject(e.getValue(), ctx); } } } }
/** * Records all undeployed tasks. * * @param nodeId Left node ID. * @param undeployed Undeployed deployments. */ private void recordUndeployed(@Nullable UUID nodeId, Collection<SharedDeployment> undeployed) { if (!F.isEmpty(undeployed)) for (SharedDeployment d : undeployed) d.recordUndeployed(nodeId); }