Exemplo n.º 1
0
  // inherit doc comment
  public boolean canBatch(Lease lease) {
    if (lease instanceof LandlordLease) {
      return landlordUuid.equals(((LandlordLease) lease).landlordUuid);
    }

    return false;
  }
Exemplo n.º 2
0
  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)
        + "]");
  }
Exemplo n.º 3
0
 // 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);
 }
Exemplo n.º 4
0
 // purposefully inherit doc comment from supertype
 public int hashCode() {
   return cookie.hashCode();
 }
Exemplo n.º 5
0
 /**
  * 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));
 }
Exemplo n.º 6
0
 /** Override hashCode to be the hash of the service identifier */
 public int hashCode() {
   return (sbID.hashCode());
 }