org.licas.service.link

## Class Link_NM

- java.lang.Object
- - java.lang.Thread
  - - org.licas.module.LicasModule
    - - org.licas.module.FrameworkModule
      - - org.licas.module.ServiceModule
        - - org.licas.service.link.Link
          - - org.licas.service.link.Link_NM

- All Implemented Interfaces:
    java.lang.Runnable, ServiceDef

      public class Link_NM
      extends Link

  This is an implementation of a linking service that does not apply any memory restrictions, but both increments and decrements links depending on their use.
  Author:
    Kieran Greer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class org.licas.service.link.Link

      `linkCount, linkSpec, linkTree, maxNegative, monitorCount, possibleCount, timeStamp`

    - ### Fields inherited from class org.licas.module.ServiceModule

      `shutDown`

    - ### Fields inherited from class org.licas.module.FrameworkModule

      `passwordHandler, service, serviceType`

    - ### Fields inherited from class org.licas.module.LicasModule

      `jarFile, syncOn, uuid`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Link_NM()` Creates a new instance of Link_NM.
    `Link_NM(Service service, PasswordHandler pHandler)` Creates a new instance of Link_NM.
    `Link_NM(Service service, PasswordHandler pHandler, LinkSpec thisLinkSpec)` Creates a new instance of Link_NM.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `updateThresholds(Thresholds theThresholds, java.util.ArrayList<java.lang.String> conceptPath, java.util.ArrayList newSources, long timeStamp, java.util.ArrayList sourcesAdded, java.util.ArrayList negative)` Update the linkSpec structure.

    - ### Methods inherited from class org.licas.service.link.Link

      `addDynamicLinks, addDynamicLinks, addDynamicLinks, dynamicLinksToString, dynamicLinksToXml, getCurrentCount, getLinkElements, getLinkSources, getLinkTree, getThresholdCount, getThresholdCount, getTotalInstancesCount, getTotalInstancesCount, getUuid, linkQuery, resetRelatedThresholds, resetRelatedThresholds, resetUpdatedThresholds, resetUpdatedThresholds, resetValues, setThresholds, setThresholds, setThresholds, xmlToDynamicLinks`

    - ### Methods inherited from class org.licas.module.ServiceModule

      `getShutDown, interrupt, setShutDown, setShutDown`

    - ### Methods inherited from class org.licas.module.FrameworkModule

      `canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType`

    - ### Methods inherited from class org.licas.module.LicasModule

      `getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState`

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

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

    - ### Methods inherited from interface org.licas.def.ServiceDef

      `getUUID, setJarFile, setUUID`

- - ### Constructor Detail

    - #### Link_NM

          public Link_NM()
                  throws java.lang.Exception

      Creates a new instance of Link_NM. Need to call `setServiceDetails` later.
      Throws:
        `java.lang.Exception` - any error.

    - #### Link_NM

          public Link_NM(Service service,
                         PasswordHandler pHandler)
                  throws java.lang.Exception

      Creates a new instance of Link_NM.
      Parameters:
        `service` - the parent service.
        `pHandler` - the parent password handler.
      Throws:
        `java.lang.Exception` - any error.

    - #### Link_NM

          public Link_NM(Service service,
                         PasswordHandler pHandler,
                         LinkSpec thisLinkSpec)
                  throws java.lang.Exception

      Creates a new instance of Link_NM.
      Parameters:
        `service` - the parent service.
        `pHandler` - the parent password handler.
        `thisLinkSpec` - the config to use for initialising the thresholds structures.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### updateThresholds

          protected void updateThresholds(Thresholds theThresholds,
                                          java.util.ArrayList<java.lang.String> conceptPath,
                                          java.util.ArrayList newSources,
                                          long timeStamp,
                                          java.util.ArrayList sourcesAdded,
                                          java.util.ArrayList negative)
                                   throws java.lang.Exception

      Update the linkSpec structure. Add or update the new sources references and also add these to the added sources list.
      Specified by:
        `updateThresholds` in class `Link`
      Parameters:
        `theThresholds` - the linkSpec structure.
        `conceptPath` - a preferred path to find in the tree.
        `newSources` - list of sources to add or update.
        `timeStamp` - time stamp for update.
        `sourcesAdded` - a list of all added sources over all of the update calls.
        `negative` - a list of negative source results.
      Throws:
        `java.lang.Exception` - any error.