org.apache.jcs.utils.discovery
Class DiscoveredService
java.lang.Object
org.apache.jcs.utils.discovery.DiscoveredService
- All Implemented Interfaces:
- Serializable
public class DiscoveredService
- extends Object
- implements Serializable
This contains info about a discovered service. These objects are stored in a set in the
UDPDiscoveryService.
- Author:
- Aaron Smuts
- See Also:
- Serialized Form
DiscoveredService
public DiscoveredService()
setCacheNames
public void setCacheNames(ArrayList cacheNames)
- Parameters:
cacheNames
- the cacheNames to set
getCacheNames
public ArrayList getCacheNames()
- Returns:
- the cacheNames
setServiceAddress
public void setServiceAddress(String serviceAddress)
- Parameters:
serviceAddress
- The serviceAddress to set.
getServiceAddress
public String getServiceAddress()
- Returns:
- Returns the serviceAddress.
setServicePort
public void setServicePort(int servicePort)
- Parameters:
servicePort
- The servicePort to set.
getServicePort
public int getServicePort()
- Returns:
- Returns the servicePort.
setLastHearFromTime
public void setLastHearFromTime(long lastHearFromTime)
- Parameters:
lastHearFromTime
- The lastHearFromTime to set.
getLastHearFromTime
public long getLastHearFromTime()
- Returns:
- Returns the lastHearFromTime.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
- Returns:
- hashcode based on address/port
equals
public boolean equals(Object otherArg)
- NOTE - this object is often put into sets, so equals needs to be overridden.
We can't use cache names as part of the equals unless we manually only use the address and
port in a contains check. So that we can use normal set functionality, I've kept the cache
names out.
- Overrides:
equals
in class Object
- Parameters:
otherArg
- other
- Returns:
- equality based on the address/port
toString
public String toString()
- Overrides:
toString
in class Object
- Returns:
- string for debugging purposes.
Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.