com.sun.jini.reggie
Class RegistrarImpl.SvcReg

java.lang.Object
  extended by com.sun.jini.reggie.RegistrarImpl.SvcReg
All Implemented Interfaces:
Serializable, Comparable
Enclosing class:
RegistrarImpl

private static final class RegistrarImpl.SvcReg
extends Object
implements Comparable, Serializable

A service item registration record.


Field Summary
 Item item
          The service item.
 long leaseExpiration
          The lease expiration time.
 Uuid leaseID
          The lease id.
private static long serialVersionUID
           
 
Constructor Summary
RegistrarImpl.SvcReg(Item item, Uuid leaseID, long leaseExpiration)
          Simple constructor
 
Method Summary
private static int compare(long l1, long l2)
          Compares long values, returning -1, 0, or 1 if l1 is less than, equal to or greater than l2, respectively.
 int compareTo(Object obj)
          Primary sort by leaseExpiration, secondary by leaseID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

item

public final Item item
The service item.


leaseID

public final Uuid leaseID
The lease id.


leaseExpiration

public long leaseExpiration
The lease expiration time.

Constructor Detail

RegistrarImpl.SvcReg

public RegistrarImpl.SvcReg(Item item,
                            Uuid leaseID,
                            long leaseExpiration)
Simple constructor

Method Detail

compareTo

public int compareTo(Object obj)
Primary sort by leaseExpiration, secondary by leaseID. The secondary sort is immaterial, except to ensure a total order (required by TreeMap).

Specified by:
compareTo in interface Comparable

compare

private static int compare(long l1,
                           long l2)
Compares long values, returning -1, 0, or 1 if l1 is less than, equal to or greater than l2, respectively.



Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.