Re: Recommendations for working with LookupCache
Mark Brouwer <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Hi Patrick, Glad the problem is solved. Patrick Wright wrote: > One question (re: Jini design)--why discard service references and not > service items? It's not clear to me how one should look at it (esp. > being new to Jini). ServiceItem is the data container for the service proxy and its meta data (lookup attributes and ServiceID). The lookup attributes might change while time progresses so there is no stable notion of a ServiceItem. In case you would pass in ServiceItem the lookup cache could only use the stable parts to determine the service (and its associated meta data) to discard. That would either be the ServiceID or the service proxy [1]. In my experience in most cases, once obtained, you pass around the service proxy for computations and you don't remember the ServiceItem so it is more likely you have the service proxy object to discard than access to the ServiceItem. BTW was the API for LookupCache not completely clear to you? In case ServiceItem was expected I would have also assumed the LookupCache.discard() method to take a ServiceItem object. Always be extremely cautious when a method takes an object as an argument ;-) [1] this assumes that in case of a specialized proxy a proper equals has been implemented or in case you have a pure Jini ERI proxy (or JRMP stub) this is taken care of automatically. -- Mark -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]