Class DiscoveredService
java.lang.Object
org.apache.commons.jcs3.utils.discovery.DiscoveredService
- All Implemented Interfaces:
Serializable
This contains info about a discovered service. These objects are stored in a set in the
UDPDiscoveryService.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorDiscoveredService
(UDPDiscoveryMessage message) Constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
NOTE - this object is often put into sets, so equals needs to be overridden.long
int
int
hashCode()
void
setCacheNames
(ArrayList<String> cacheNames) void
setLastHearFromTime
(long lastHearFromTime) void
setServiceAddress
(String serviceAddress) void
setServicePort
(int servicePort) toString()
-
Constructor Details
-
DiscoveredService
public DiscoveredService()Default constructor -
DiscoveredService
Constructor- Parameters:
message
- incoming message- Since:
- 3.1
-
-
Method Details
-
setCacheNames
- Parameters:
cacheNames
- the cacheNames to set
-
getCacheNames
- Returns:
- the cacheNames
-
setServiceAddress
- Parameters:
serviceAddress
- The serviceAddress to set.
-
getServiceAddress
- Returns:
- Returns the serviceAddress.
-
setServicePort
- Parameters:
servicePort
- The servicePort to set.
-
getServicePort
- Returns:
- Returns the servicePort.
-
setLastHearFromTime
- Parameters:
lastHearFromTime
- The lastHearFromTime to set.
-
getLastHearFromTime
- Returns:
- Returns the lastHearFromTime.
-
hashCode
-
equals
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.
-
toString
-