public class SystemInformationServiceAdapter extends Object implements SystemInformationService
SystemInformationService
. Intended for
use in implementations of the service which wish to override a handful of
selected behaviors, such as unit testing.Constructor and Description |
---|
SystemInformationServiceAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
consolidateCoreDataVersion(long sourceSystemCoreDataVersion)
Consolidates the core data version with an up to date system.
|
void |
coreDataChanged()
Notify that core data has changed and thus core data version needs to
be updated.
|
Collection<SystemInformation> |
getActiveSystems()
Gets all known active systems.
|
SystemInformation |
getSystem()
Gets the local system information.
|
SystemInformation |
getSystem(Id<SystemInformation,UUID> id)
Get the system information with the specified unique id.
|
Collection<SystemInformation> |
getSystems()
Gets all known systems.
|
boolean |
isConfigurationSafe()
Is the system safe to change configuration without risk of losing
changes across team members?
|
boolean |
isMajorityCluster()
Check cluster majority.
|
void |
register(SystemInformationListener observer)
Registers an observer (listener).
|
SystemInformation |
setSelfIp(IpAddress ip)
Set the IP address of the non-teamed, self=true system.
|
void |
unregister(SystemInformationListener observer)
Unregisters an observer (listener).
|
public void register(SystemInformationListener observer)
Observable
register
in interface Observable<SystemInformationListener>
observer
- observer to registerpublic void unregister(SystemInformationListener observer)
Observable
unregister
in interface Observable<SystemInformationListener>
observer
- observer to unregisterpublic SystemInformation getSystem()
SystemInformationService
getSystem
in interface SystemInformationService
public SystemInformation getSystem(Id<SystemInformation,UUID> id)
SystemInformationService
getSystem
in interface SystemInformationService
id
- system idpublic Collection<SystemInformation> getSystems()
SystemInformationService
getSystems
in interface SystemInformationService
public Collection<SystemInformation> getActiveSystems()
SystemInformationService
getActiveSystems
in interface SystemInformationService
public void coreDataChanged()
SystemInformationService
coreDataChanged
in interface SystemInformationService
public void consolidateCoreDataVersion(long sourceSystemCoreDataVersion)
SystemInformationService
consolidateCoreDataVersion
in interface SystemInformationService
sourceSystemCoreDataVersion
- core data version of the system that
is up to date and thus the data has been synchronized withpublic SystemInformation setSelfIp(IpAddress ip)
SystemInformationService
setSelfIp
in interface SystemInformationService
ip
- the new IP addresspublic boolean isMajorityCluster()
SystemInformationService
isMajorityCluster
in interface SystemInformationService
true
if current cluster members form absolute majority of
configured cluster, false
otherwisepublic boolean isConfigurationSafe()
SystemInformationService
isConfigurationSafe
in interface SystemInformationService
true
if configuration changes are safe,
false
otherwiseCopyright © 2015. All Rights Reserved.