// inherit doc comment public boolean canBatch(Lease lease) { if (lease instanceof LandlordLease) { return landlordUuid.equals(((LandlordLease) lease).landlordUuid); } return false; }
public String toString() { String serviceClassName; try { getService(); serviceClassName = service.getClass().getName(); } catch (Exception e) { serviceClassName = "unknown : system error"; } String instanceID = "<null>"; if (sbConfig != null) { Long id = sbConfig.getInstanceID(); if (id != null) instanceID = id.toString(); } return ("Instance=[" + instanceID + "] " + "Proxy=[" + serviceClassName + "] " + "ID=[" + sbID.toString() + "] " + "HostAddress=[" + (hostAddress == null ? "null" : hostAddress) + "]"); }
// inherit doc comment public void store(ObjectOutputStream out) throws IOException { final long bits0; final long bits1; if (id == null) { bits0 = 0; bits1 = 0; } else { bits0 = id.getMostSignificantBits(); bits1 = id.getLeastSignificantBits(); } out.writeLong(bits0); out.writeLong(bits1); out.writeLong(expires); out.writeObject(codebase); out.writeObject(className); out.writeObject(superclasses); out.writeObject(values); out.writeLong(hash); out.writeObject(hashes); }
// purposefully inherit doc comment from supertype public int hashCode() { return cookie.hashCode(); }
/** * A ServiceBeanInstance is equal to another ServiceBeanInstance if the service identifier * properties are equal */ public boolean equals(Object obj) { if (this == obj) return (true); if (!(obj instanceof ServiceBeanInstance)) return (false); ServiceBeanInstance other = (ServiceBeanInstance) obj; return (sbID.equals(other.sbID)); }
/** Override hashCode to be the hash of the service identifier */ public int hashCode() { return (sbID.hashCode()); }