com.h3c.sdn.system

## Class SystemInformation

- java.lang.Object
- - com.h3c.sdn.AbstractModel<T,UUID>
  - - com.h3c.sdn.Model<SystemInformation>
    - - com.h3c.sdn.system.SystemInformation

- All Implemented Interfaces:
    Addressable<IpAddress>, Transportable<SystemInformation,UUID>, Serializable

      public class SystemInformation
      extends Model<SystemInformation>
      implements Addressable<IpAddress>

  Descriptor holding the basic information required to represent the system information.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SystemInformation(boolean isSelf, IpAddress address)` Construct a new system descriptor.
    `SystemInformation(Id<SystemInformation,UUID> id, boolean isSelf, IpAddress address)` Construct a new system descriptor using the supplied unique identification.
    `SystemInformation(SystemInformation si)` Construct a deep copy of another SystemInformation object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IpAddress` | `address()` Returns the contact address of the system.
    `long` | `coreDataVersion()` Gets the core data version.
    `Date` | `coreDataVersionTimestamp()` Gets the core data version timestamp.
    `IpAddress` | `getAddress()` Gets the address.
    `boolean` | `isSelf()` Returns true if this system information represents the local system.
    `SystemRole` | `role()` Returns the role of the system.
    `void` | `setAddress(IpAddress address)` Set the contact address of the system.
    `void` | `setCoreDataVersion(long coreDataVersion)` Sets the core data version.
    `void` | `setCoreDataVersionTimestamp(Date coreDataVersionTimestamp)` Sets the core data version timestamp.
    `void` | `setRole(SystemRole role)` Sets the role of the system.
    `void` | `setStatus(SystemStatus status)` Sets the `Status` for the system.
    `void` | `setTimeAtLastContact(long remoteContactTime)` Set the current time on the system, as recorded at the time of the last contact with this system.
    `void` | `setTimeAtLastContact(long remoteContactTime, long localContactTime)` Set the current time on the system, as recorded at the time of the last contact with this system.
    `void` | `setVersion(BuildVersion version)` Set the software version of the system.
    `SystemStatus` | `status()` Returns the `Status` for the system.
    `long` | `timeAtLastContact()` Returns the current time on the system, recorded at the time of the last contact with this system.
    `long` | `timeOfLastContact()` Returns the local time of the last contact with the system.
    `long` | `timeSkew()` Return the current time-skew in milliseconds relative to this system.
    `BuildVersion` | `version()` Returns the software version of the system.

    - ### Methods inherited from class com.h3c.sdn.AbstractModel

      `equals, getId, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SystemInformation

          public SystemInformation(boolean isSelf,
                           IpAddress address)

      Construct a new system descriptor. An unique identification will be generated.
      Parameters:
        `isSelf` - true to indicate this descriptor represents local system
        `address` - contact address

    - #### SystemInformation

          public SystemInformation(Id<SystemInformation,UUID> id,
                           boolean isSelf,
                           IpAddress address)

      Construct a new system descriptor using the supplied unique identification. The supplied unique identification must not be null.
      Parameters:
        `isSelf` - true to indicate this descriptor represents local system
        `id` - the unique id
        `address` - contact address
      Throws:
        `IllegalArgumentException` - if unique id is null

    - #### SystemInformation

          public SystemInformation(SystemInformation si)

      Construct a deep copy of another SystemInformation object.
      Parameters:
        `si` - a SystemInformation object to copy

  - ### Method Detail

    - #### version

          public BuildVersion version()

      Returns the software version of the system.
      Returns:
        software version

    - #### setVersion

          public void setVersion(BuildVersion version)

      Set the software version of the system.
      Parameters:
        `version` - new software version

    - #### address

          public IpAddress address()

      Returns the contact address of the system.
      Returns:
        address and port

    - #### setAddress

          public void setAddress(IpAddress address)

      Set the contact address of the system.
      Parameters:
        `address` - new contact address

    - #### coreDataVersion

          public long coreDataVersion()

      Gets the core data version.
      Returns:
        the core data version

    - #### setCoreDataVersion

          public void setCoreDataVersion(long coreDataVersion)

      Sets the core data version.
      Parameters:
        `coreDataVersion` - the core data version

    - #### coreDataVersionTimestamp

          public Date coreDataVersionTimestamp()

      Gets the core data version timestamp.
      Returns:
        the core data version timestamp

    - #### setCoreDataVersionTimestamp

          public void setCoreDataVersionTimestamp(Date coreDataVersionTimestamp)

      Sets the core data version timestamp.
      Parameters:
        `coreDataVersionTimestamp` - the core data version timestamp

    - #### role

          public SystemRole role()

      Returns the role of the system.
      Returns:
        system role

    - #### setRole

          public void setRole(SystemRole role)

      Sets the role of the system.
      Parameters:
        `role` - new system role

    - #### timeAtLastContact

          public long timeAtLastContact()

      Returns the current time on the system, recorded at the time of the last contact with this system. For the system representing this system, the time-skew will always be current time.
      Returns:
        time on the system recorded at the time of the last contact

    - #### timeOfLastContact

          public long timeOfLastContact()

      Returns the local time of the last contact with the system.
      Returns:
        last contact time-stamp

    - #### setTimeAtLastContact

          public void setTimeAtLastContact(long remoteContactTime)

      Set the current time on the system, as recorded at the time of the last contact with this system. Also set the time of the last contact to the current local time. For the system representing this system, the operation will be ignored.
      Parameters:
        `remoteContactTime` - time on the remote system at the time of last contact

    - #### setTimeAtLastContact

          public void setTimeAtLastContact(long remoteContactTime,
                                  long localContactTime)

      Set the current time on the system, as recorded at the time of the last contact with this system. Also set the time of the last contact to the given local time. For the system representing this system, the operation will be ignored.
      Parameters:
        `remoteContactTime` - time on the remote system at the time of last contact
        `localContactTime` - time on the local system at the time of last contact

    - #### timeSkew

          public long timeSkew()

      Return the current time-skew in milliseconds relative to this system. For the system representing this system, the time-skew will always be 0.
      Returns:
        time-skew in milliseconds

    - #### isSelf

          public boolean isSelf()

      Returns true if this system information represents the local system.
      Returns:
        `true` if local system

    - #### status

          public SystemStatus status()

      Returns the `Status` for the system.
      Returns:
        the status

    - #### setStatus

          public void setStatus(SystemStatus status)

      Sets the `Status` for the system.
      Parameters:
        `status` - the status to set

    - #### getAddress

          public IpAddress getAddress()

      Description copied from interface: `Addressable`
      Gets the address.
      Specified by:
        `getAddress` in interface `Addressable<IpAddress>`
      Returns:
        the address.

Copyright © 2014. All Rights Reserved.