com.h3c.sdn.misc.dsync.net

## Class LinkSyncObj

- java.lang.Object
- - com.h3c.sdn.misc.dsync.AbstractSyncObj<Set<LinkSyncObj>>
  - - com.h3c.sdn.misc.dsync.net.LinkSyncObj

- All Implemented Interfaces:
    SyncObj<Set<LinkSyncObj>>, Serializable

      public class LinkSyncObj
      extends AbstractSyncObj<Set<LinkSyncObj>>

  A Sync object for encoding and decoding `LinkDTO` objects. for high availability.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ROOT`
    `static String` | `ROOTS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LinkSyncObj()`
    `LinkSyncObj(Set<Link> linkLists)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SyncObj` | `decode(com.fasterxml.jackson.databind.node.ObjectNode jsonNode)` Convert a given raw ObjectNode to required SyncObject.
    `com.fasterxml.jackson.databind.node.ObjectNode` | `encode(com.fasterxml.jackson.databind.node.ObjectNode rawNode)` Stuffs an empty ObjectNode with desired form of the SyncObj.
    `Set<Link>` | `getLinks()`

    - ### Methods inherited from class com.h3c.sdn.misc.dsync.AbstractSyncObj

      `isNull, mapper, marshal, unmarshal`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ROOT

          public static final String ROOT

      See Also:
        Constant Field Values

    - #### ROOTS

          public static final String ROOTS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LinkSyncObj

          public LinkSyncObj(Set<Link> linkLists)

    - #### LinkSyncObj

          public LinkSyncObj()

  - ### Method Detail

    - #### getLinks

          public Set<Link> getLinks()

    - #### decode

          public SyncObj decode(com.fasterxml.jackson.databind.node.ObjectNode jsonNode)

      Description copied from class: `AbstractSyncObj`
      Convert a given raw ObjectNode to required SyncObject.
      Specified by:
        `decode` in class `AbstractSyncObj<Set<LinkSyncObj>>`
      Parameters:
        `jsonNode` - the raw ObjectNode synthesized from the bytes retrieved from the HA infrastructure.
      Returns:
        the decoded SyncObject

    - #### encode

          public com.fasterxml.jackson.databind.node.ObjectNode encode(com.fasterxml.jackson.databind.node.ObjectNode rawNode)

      Description copied from class: `AbstractSyncObj`
      Stuffs an empty ObjectNode with desired form of the SyncObj. at this point.
      Specified by:
        `encode` in class `AbstractSyncObj<Set<LinkSyncObj>>`
      Parameters:
        `rawNode` - the empty ObjectNode that needs to be built on.
      Returns:
        the fully dressed ObjectNode that represents the SyncObj.

Copyright © 2014. All Rights Reserved.