org.opennms.netmgt.importer.operations
Class ImportOperationsManager

java.lang.Object
  extended by org.opennms.netmgt.importer.operations.ImportOperationsManager

public class ImportOperationsManager
extends Object

This nodes job is to tracks nodes that need to be deleted, added, or changed

Version:
$Id: $
Author:
david

Constructor Summary
ImportOperationsManager(Map<String,Integer> foreignIdToNodeMap, ImportOperationFactory operationFactory)
          Constructor for ImportOperationsManager.
 
Method Summary
 SaveOrUpdateOperation foundNode(String foreignId, String nodeLabel, String building, String city)
          foundNode
 int getDeleteCount()
          getDeleteCount
 EventIpcManager getEventMgr()
          getEventMgr
 String getForeignSource()
          getForeignSource
 int getInsertCount()
          getInsertCount
 int getOperationCount()
          getOperationCount
 ImportStatistics getStats()
          getStats
 int getUpdateCount()
          getUpdateCount
protected  void persistOperation(ImportOperation oper, org.springframework.transaction.support.TransactionTemplate template, OnmsDao<?,?> dao)
          persistOperation
 void persistOperations(org.springframework.transaction.support.TransactionTemplate template, OnmsDao<?,?> dao)
          persistOperations
protected  void preprocessOperation(ImportOperation oper, org.springframework.transaction.support.TransactionTemplate template, OnmsDao<?,?> dao, ExecutorService dbPool)
          preprocessOperation
 void setEventMgr(EventIpcManager eventMgr)
          setEventMgr
 void setForeignSource(String foreignSource)
          setForeignSource
 void setScanThreads(int scanThreads)
          setScanThreads
 void setStats(ImportStatistics stats)
          setStats
 void setWriteThreads(int writeThreads)
          setWriteThreads
 void shutdownAndWaitForCompletion(ExecutorService executorService, String msg)
          shutdownAndWaitForCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportOperationsManager

public ImportOperationsManager(Map<String,Integer> foreignIdToNodeMap,
                               ImportOperationFactory operationFactory)

Constructor for ImportOperationsManager.

Parameters:
foreignIdToNodeMap - a Map object.
operationFactory - a ImportOperationFactory object.
Method Detail

foundNode

public SaveOrUpdateOperation foundNode(String foreignId,
                                       String nodeLabel,
                                       String building,
                                       String city)

foundNode

Parameters:
foreignId - a String object.
nodeLabel - a String object.
building - a String object.
city - a String object.
Returns:
a SaveOrUpdateOperation object.

getOperationCount

public int getOperationCount()

getOperationCount

Returns:
a int.

getInsertCount

public int getInsertCount()

getInsertCount

Returns:
a int.

getUpdateCount

public int getUpdateCount()

getUpdateCount

Returns:
a int.

getDeleteCount

public int getDeleteCount()

getDeleteCount

Returns:
a int.

shutdownAndWaitForCompletion

public void shutdownAndWaitForCompletion(ExecutorService executorService,
                                         String msg)

shutdownAndWaitForCompletion

Parameters:
executorService - a ExecutorService object.
msg - a String object.

persistOperations

public void persistOperations(org.springframework.transaction.support.TransactionTemplate template,
                              OnmsDao<?,?> dao)

persistOperations

Parameters:
template - a TransactionTemplate object.
dao - a OnmsDao object.

preprocessOperation

protected void preprocessOperation(ImportOperation oper,
                                   org.springframework.transaction.support.TransactionTemplate template,
                                   OnmsDao<?,?> dao,
                                   ExecutorService dbPool)

preprocessOperation

Parameters:
oper - a ImportOperation object.
template - a TransactionTemplate object.
dao - a OnmsDao object.
dbPool - a ExecutorService object.

persistOperation

protected void persistOperation(ImportOperation oper,
                                org.springframework.transaction.support.TransactionTemplate template,
                                OnmsDao<?,?> dao)

persistOperation

Parameters:
oper - a ImportOperation object.
template - a TransactionTemplate object.
dao - a OnmsDao object.

setScanThreads

public void setScanThreads(int scanThreads)

setScanThreads

Parameters:
scanThreads - a int.

setWriteThreads

public void setWriteThreads(int writeThreads)

setWriteThreads

Parameters:
writeThreads - a int.

getEventMgr

public EventIpcManager getEventMgr()

getEventMgr

Returns:
a EventIpcManager object.

setEventMgr

public void setEventMgr(EventIpcManager eventMgr)

setEventMgr

Parameters:
eventMgr - a EventIpcManager object.

getStats

public ImportStatistics getStats()

getStats

Returns:
a ImportStatistics object.

setStats

public void setStats(ImportStatistics stats)

setStats

Parameters:
stats - a ImportStatistics object.

setForeignSource

public void setForeignSource(String foreignSource)

setForeignSource

Parameters:
foreignSource - a String object.

getForeignSource

public String getForeignSource()

getForeignSource

Returns:
a String object.


Copyright © 2011. All Rights Reserved.