Skip to main content

---HOW TO CLEAR LOCAL CACHE MANAGER THAT STRORE ALL ADVERTISEMENT---

2 replies [Last post]
carnado
Offline
Joined: 2007-08-21

Can someone show me how to clear our local cache.....i need some light about it

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
praedo
Offline
Joined: 2008-03-05

Try something like this...

DiscoveryServise discovery = group.getDiscoveryService();
Enumeration advs = discovery.getLocalAdvertisements(type,"Name","value");
while(advs.hasMoreElements()){
discovery.flushAdvertisement(advs.nextElement());
}

This will remove all advertisements with specified type and property 'Name' with specified value 'value'. Name and value can be null to specifie all advertisements of specified type.

carnado
Offline
Joined: 2007-08-21

Thank you my friend for your help, it is very helpful