jaugment2.speech
Class JavaSpeechService.myLandLord

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--jaugment2.speech.JavaSpeechService.myLandLord
Enclosing class:
JavaSpeechService

private class JavaSpeechService.myLandLord
extends java.rmi.server.UnicastRemoteObject
implements com.sun.jini.lease.landlord.Landlord, com.sun.jini.lease.landlord.LocalLandlord

This class contains all out lease-management. It contains 2 sets of objects we lease storage-space in.

See Also:
Serialized Form

Inner classes inherited from class com.sun.jini.lease.landlord.Landlord
com.sun.jini.lease.landlord.Landlord.RenewResults
 
Field Summary
private  java.util.Hashtable[] cookie2item
           
private  int cookieval
           
private  java.lang.Thread leasethread
           
private  int maxduration
           
private  java.util.TreeSet[] sets
          Array of sorted mappings of storedItem sorted by absolute expiration-time, mapped from cookies(for renewal).
private  int typenum
           
private  com.sun.jini.lease.landlord.LandlordUtil util
           
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf
 
Fields inherited from class java.rmi.server.RemoteServer
log, logname, serialVersionUID
 
Fields inherited from class java.rmi.server.RemoteObject
ref, serialVersionUID
 
Constructor Summary
JavaSpeechService.myLandLord()
           
 
Method Summary
 void cancel(java.lang.Object cookie)
           
 java.util.Map cancelAll(java.lang.Object[] cookie)
           
(package private)  net.jini.core.lease.Lease grantLease(int type, java.lang.Object storeMe, long requestedDuration)
           
private  long policy(long d)
           
 long renew(java.lang.Object cookie, long duration)
           
 com.sun.jini.lease.landlord.Landlord.RenewResults renewAll(java.lang.Object[] cookies, long[] durations)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
, clone, exportObject, exportObject, exportObject, exportObject, readObject, reexport, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub, writeObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

util

private com.sun.jini.lease.landlord.LandlordUtil util

typenum

private int typenum

maxduration

private int maxduration

leasethread

private java.lang.Thread leasethread

sets

private java.util.TreeSet[] sets
Array of sorted mappings of storedItem sorted by absolute expiration-time, mapped from cookies(for renewal). The array is indexed by type.

cookie2item

private java.util.Hashtable[] cookie2item

cookieval

private int cookieval
Constructor Detail

JavaSpeechService.myLandLord

public JavaSpeechService.myLandLord()
                             throws java.rmi.RemoteException
Method Detail

grantLease

net.jini.core.lease.Lease grantLease(int type,
                                     java.lang.Object storeMe,
                                     long requestedDuration)
                               throws java.rmi.RemoteException,
                                      net.jini.core.lease.LeaseDeniedException

policy

private long policy(long d)

renew

public long renew(java.lang.Object cookie,
                  long duration)
           throws net.jini.core.lease.LeaseDeniedException,
                  net.jini.core.lease.UnknownLeaseException
Specified by:
renew in interface com.sun.jini.lease.landlord.Landlord

cancel

public void cancel(java.lang.Object cookie)
            throws net.jini.core.lease.UnknownLeaseException
Specified by:
cancel in interface com.sun.jini.lease.landlord.Landlord

renewAll

public com.sun.jini.lease.landlord.Landlord.RenewResults renewAll(java.lang.Object[] cookies,
                                                                  long[] durations)
                                                           throws java.rmi.RemoteException
Specified by:
renewAll in interface com.sun.jini.lease.landlord.Landlord

cancelAll

public java.util.Map cancelAll(java.lang.Object[] cookie)
                        throws java.rmi.RemoteException
Specified by:
cancelAll in interface com.sun.jini.lease.landlord.Landlord