@NotThreadSafe public final class MasterInfo extends Object
Constructor and Description |
---|
MasterInfo(long id,
Address address)
Creates a new instance of
MasterInfo . |
Modifier and Type | Method and Description |
---|---|
Address |
getAddress() |
long |
getId() |
long |
getJournalEntriesSinceCheckpoint() |
long |
getLastCheckpointTimeMs() |
long |
getLastUpdatedTimeMs() |
long |
getLosePrimacyTimeMs() |
String |
getRevision() |
long |
getStartTimeMs() |
String |
getVersion() |
void |
setJournalEntriesSinceCheckpoint(long journalEntriesSinceCheckpoint) |
void |
setLastCheckpointTimeMs(long lastCheckpointTimeMs) |
void |
setLosePrimacyTimeMs(long losePrimacyTimeMs) |
void |
setRevision(String revision) |
void |
setStartTimeMs(long startTimeMs) |
void |
setVersion(String version) |
String |
toString() |
void |
updateLastUpdatedTimeMs()
Updates the last updated time of the master in ms.
|
public 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 long getStartTimeMs()
public long getLosePrimacyTimeMs()
public String getVersion()
public String getRevision()
public long getLastCheckpointTimeMs()
public long getJournalEntriesSinceCheckpoint()
public void setStartTimeMs(long startTimeMs)
startTimeMs
- the start time of the master in mspublic void setLosePrimacyTimeMs(long losePrimacyTimeMs)
losePrimacyTimeMs
- the last primacy state change time of the master in mspublic void setVersion(String version)
version
- the version of the masterpublic void setRevision(String revision)
revision
- the revision of the masterpublic void updateLastUpdatedTimeMs()
public void setLastCheckpointTimeMs(long lastCheckpointTimeMs)
lastCheckpointTimeMs
- the time of last checkpointpublic void setJournalEntriesSinceCheckpoint(long journalEntriesSinceCheckpoint)
journalEntriesSinceCheckpoint
- number of journal entries since last checkpointCopyright © 2023. All Rights Reserved.