@NotThreadSafe public final class MasterInfo extends Object
Constructor and Description |
---|
MasterInfo()
Creates a new instance of
MasterInfo . |
MasterInfo(long id,
Address address)
Creates a new instance of
MasterInfo . |
MasterInfo(long id,
Address address,
long lastUpdatedTimeMs)
Creates a new instance of
MasterInfo . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Address |
getAddress() |
long |
getId() |
long |
getLastUpdatedTimeMs() |
int |
hashCode() |
MasterInfo |
setAddress(Address address) |
MasterInfo |
setId(long id) |
MasterInfo |
setLastUpdatedTimeMs(long lastUpdatedTimeMs) |
String |
toString() |
void |
updateLastUpdatedTimeMs()
Updates the last updated time of the master (in milliseconds).
|
public MasterInfo()
MasterInfo
.public MasterInfo(long id, Address address, long lastUpdatedTimeMs)
MasterInfo
.id
- the master id to useaddress
- the master address to uselastUpdatedTimeMs
- the master lastUpdatedTimeMs to usepublic MasterInfo(long id, Address address)
MasterInfo
.id
- the master id to useaddress
- the master address to usepublic Address getAddress()
public long getId()
public long getLastUpdatedTimeMs()
public MasterInfo setAddress(Address address)
address
- the master address informationpublic MasterInfo setId(long id)
id
- the master idpublic MasterInfo setLastUpdatedTimeMs(long lastUpdatedTimeMs)
lastUpdatedTimeMs
- the last update time in mspublic void updateLastUpdatedTimeMs()
Copyright © 2023. All Rights Reserved.