public class LookupManager extends Object implements ServiceIDListener, LeaseListener
registerForever()method registering forever(Lease.FOREVER) JSpace with with all Lookup Services that discovered in the Network. The
cleanup()method provides unregistration of all spaces that was registered FOREVER from all Lookup Services. LookupManager support container and JSpace registration with Rmi registry depends "com.j_spaces.core.container.use_rmi_registry" property in
LeaseRenewManagerclass to renews each lease of registered space as necessary when a desired expiration time achieved. Every Lookup Service that was discovered in the Network, dynamically will registered with all spaces that stored in this
LookupManagerobject. Every LookupService that was discovered in the Network will get notification to
discovered()method. Whether one or more lookup service registrars has been discarded this class will get notification to
terminatefunction unregistering container and JSpaces from all lookup services and terminate LookupManager.//TODO Constructor of this class get as parameter
Logobject that provides writing all Log-statements that existing in this class to Log(it can be File, Socket). If this
Logobject equals to null, all Log-statements will be disable.
|Constructor and Description|
|Modifier and Type||Method and Description|
Parse LookupLocator URLs and build array of
Called by the LeaseRenewalManager when it cannot renew a lease that it is managing, and the lease's desired expiration time has not yet been reached.
Registering forever proxy of JSpace with all Lookup services that exists in the Network.
Call back function that receive as parameter the
Unregister all JSpace and JSpace container from all Lookup Services.
Unregistering appropriate Space from all Lookup Services that this space was registered.
public LookupManager(String containerName) throws NamingException, IOException
public void serviceIDNotify(ServiceID serviceID)
serviceIDof registered service.
serviceID- ServiceID of registered service.
public void notify(LeaseRenewalEvent leaseManagerEvent)
leaseManagerEvent- Instance of LeaseRenewalEvent containing information about the lease that the
LeaseRenewalManagerwas unable to renew.
public static LookupLocator buildLookupLocators(String lookupLocatorURLs)
LookupLocator. List of LookupLocator URLs should be separates by comma. For example: "host1:4180,host2:4180,host3:4180"
lookupLocatorURLs- List of LookupLocators URLs, separates by ",".
public void register(IJSpace spaceProxy, String containerName)
spaceProxy- JSpace proxy.
public void unregister(String spaceName)
spaceName- JSpace name. is not known to the grantor of the lease. This can occur when a lease expires or has been canceled.
public void terminate() throws RemoteException
Copyright © GigaSpaces.