/** * * @throws NullPointerException if the specified key is null */ public boolean remove(int key, Object value) { int hash = hash(key); if (value == null) return false; return segmentFor(hash).remove(key, hash, value) != null; }
public ClassPathLoader(boolean excludeTCCL, File workingDir) { this.excludeTCCL = excludeTCCL; this.jarDeployer = new JarDeployer(workingDir); rebuildClassLoaderForDeployedJars(); }
/** * Marks a {@code DataSerializer} className for registration with the data serialization * framework. Does not necessarily load the classes into this VM. * * @param distribute If true, distribute this data serializer. * @see DataSerializer#register(Class) */ public static void register(String className, boolean distribute) { register(className, distribute, new SerializerAttributesHolder()); }
/** * Resolve the class from the given name. Supports primitive types, too. */ public static Class classFromName(String className) throws ClassNotFoundException { Class result = checkForPrimType(className); if (result == null) { result = ClassPathLoader.getLatest().forName(className); } return result; }
/** * Creates a VersionedObjectOutput that wraps the specified underlying ObjectOutput. * * @param out the underlying {@link ObjectOutput} * @param version the product version that serialized object on the given {@link ObjectOutput} */ public VersionedObjectOutput(ObjectOutput out, Version version) { if (version.compareTo(Version.CURRENT) > 0) { Assert.fail("unexpected version: " + version + ", CURRENT: " + Version.CURRENT); } this.out = out; this.version = version; }
public static String getSourceRevision() { return getDescription().getProperty(SOURCE_REVISION); }
private static boolean testOneInterface(InetAddress addr, int port) { Keeper k = keepOneInterface(addr, port); if (k != null) { k.release(); return true; } else { return false; } }
/** * Tests if the specified object is a key in this table. * * @param key possible key * @return <tt>true</tt> if and only if the specified object is a key in this table, as determined * by the <tt>equals</tt> method; <tt>false</tt> otherwise. * @throws NullPointerException if the specified key is null */ public boolean containsKey(int key) { int hash = hash(key); return segmentFor(hash).containsKey(key, hash); }
public static void setLocatorStarted(File directory, int port, InetAddress bindAddress) { ManagerInfo.saveManagerInfo(OSProcess.getId(), STARTED_STATUS_CODE, directory, port, bindAddress); }
/** * Lazily creates a new {@code Instantiator} with the given class and id. * * @throws IllegalArgumentException The instantiator cannot be created * @throws IllegalStateException The instantiator cannot be registered */ public static void register(String instantiatorClass, String instantiatedClass, int id, boolean distribute) { if (checkForThread()) { register(instantiatorClass, new InstantiatorAttributesHolder(instantiatorClass, instantiatedClass, id), distribute); } }
public static void print(PrintWriter pw) { getDescription().print(pw); }
/** * Lazily creates a new {@code Instantiator} with the given class and id. * * This method is only called when server connection and CacheClientUpdaterThread * * @throws IllegalArgumentException The instantiator cannot be created * @throws IllegalStateException The instantiator cannot be registered */ public static void register(String instantiatorClass, String instantiatedClass, int id, boolean distribute, EventID eventId, ClientProxyMembershipID context) { register(instantiatorClass, new InstantiatorAttributesHolder(instantiatorClass, instantiatedClass, id, eventId, context), distribute); }
public static String getBuildId() { return getDescription().getProperty(BUILD_ID); }
/** * Removes the key (and its corresponding value) from this map. This method does nothing if the * key is not in the map. * * @param key the key that needs to be removed * @return the previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no * mapping for <tt>key</tt> * @throws NullPointerException if the specified key is null */ public V remove(int key) { int hash = hash(key); return segmentFor(hash).remove(key, hash, null); }
public static void setLocatorStopping(File directory, int port, InetAddress bindAddress) { ManagerInfo.saveManagerInfo(OSProcess.getId(), STOPPING_STATUS_CODE, directory, port, bindAddress); }
public ClassPathLoader(boolean excludeTCCL) { this.excludeTCCL = excludeTCCL; this.jarDeployer = new JarDeployer(); rebuildClassLoaderForDeployedJars(); }
public static String getBuildDate() { return getDescription().getProperty(BUILD_DATE); }
public static String getBuildPlatform() { return getDescription().getProperty(BUILD_PLATFORM); }
public static String getBuildJavaVersion() { return getDescription().getProperty(BUILD_JAVA_VERSION); }