Package com.metasolv.nm.collector.file
Class FileEINode
java.lang.Object
com.nt.udc.ndk.node.DCNode
com.nt.udc.ndk.node.EINode
com.metasolv.nm.collector.file.FileEINode
- All Implemented Interfaces:
AdminIfc
,ConfigIfc
,LoggerIfc
,NodeHealthIfc
,NodeStateManagementIfc
,PropertyIfc
,StateManagementIfc
- Direct Known Subclasses:
Asn1FileEINode
,Sol42EINode
This class is based on the FlatFileEINode class. The main difference is that
the FileEINode is no longer responsible for instantiating the FTP objects.
Instead, this responsibility is left up to the transport object.
The FileEINode class initializes all of the node's main components including
the transport, the NPL field processor, the DC stream handler, and the GUI.
It also initializes the ASCII file handler as its default file handler.
The FileEINode is an EI Node that periodically retrieves one or more files
from a local directory and processes them via a file handler object. The
files can be "pushed" to the local directory, or they can be "pulled" via
FTP.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected boolean
protected int
protected EIFileCycler
protected FileEIDuplicateCheck
protected FileHandlerIfc
protected FileHandlerIfc[]
protected boolean
protected FileEISequenceCheck
protected String
protected boolean
protected FtpFileTracker
protected com.nt.common.util.SMGLock
Used to properly shut down all threads.protected boolean
protected static final String
protected boolean
protected int
protected String
protected String
protected MultiThreadManager
protected EITransport[]
Fields inherited from class com.nt.udc.ndk.node.EINode
eiTransport, eiTransports, fieldProcessor, fp, fpThread, transportThread, transThread
Fields inherited from class com.nt.udc.ndk.node.DCNode
backupDir, config, configClass, configDir, configFile, configGUIClass, dcHandls, DEFAULT_PROCESSING_INTERVAL, fileMngr, generalMonitoringTimer, inputMonitoringAlarmRaised, inputMonitoringEnabled, inputMonitoringNARFileMgr, inputMonitoringPollingInterval, inputMonitoringPreviousCount, inputMonitoringSilenceCounter, inputMonitoringSilenceInterval, inputMonitoringSilenceIntervalText, KUBERNETES_POD_NAME, logDir, logger, majorType, node_pm, nodeid, NODEINIT, NODERECONFIG, nodeStartTime, nodeStateFileName, OCOMC_NODE_ID, OCOMC_POD_NAME, OCOMC_REPLICA_INDEX, OCOMC_STS_NAME, processingInterval, reconfiguring, savingStateOn, scratchDir, shutdown, stateManager, suspenseDir, TRANSACTION_NAR_ID, udcHome
Fields inherited from interface com.nt.udc.ndk.node.LoggerIfc
FC_CONFIGURATION, FC_CONNECTIVITY, FC_INITIALIZATION, FC_INTERNALERROR, FC_INVALIDDATA, FC_NODE_CONTROL, FC_RESOURCES, FC_SECURITY, FC_SERVER_CONTROL, FC_UNDEFINED, SF_CONF_CHANGE_ERROR, SF_CONF_CONFIG_FAIL, SF_CONF_ERR_NODE_CONF, SF_CONF_INV_FTP_CONF, SF_CONF_INV_NODE_CONF, SF_CONF_INV_PARAM, SF_CONF_INV_PARAM_VAL, SF_CONF_INV_REM_DIR, SF_CONF_MISSING_PARM, SF_CONF_MISSING_PARM2, SF_CONF_NM_CONF_ERROR, SF_CONF_NO_CONFIG, SF_CONF_NO_FTP_INT, SF_CONF_NODE_CREATION, SF_CONF_NODE_START, SF_CONF_NPL_CRITICAL, SF_CONF_NPL_ERROR, SF_CONF_READ_ERROR, SF_CONF_READ_PROPS, SF_CONF_SAVE_ERROR, SF_CONF_SOCKET_INIT, SF_CONF_VER_VALIDATION, SF_CONN_DB_CON_ERR, SF_CONN_DB_CON_LOST, SF_CONN_DEGRADED_ERR, SF_CONN_ECE_CON_ERR, SF_CONN_ERR_NODEINFO, SF_CONN_ERR_RCV_DATA, SF_CONN_ERR_SEND_ACK, SF_CONN_ERROR_TACHYON_USAGE, SF_CONN_FAILED_TO_RECEIVE_RESPONSE, SF_CONN_FILE_READ_ERR, SF_CONN_FTP_ERROR, SF_CONN_FTP_ERROR2, SF_CONN_FTP_LOGIN, SF_CONN_INTERFACING_CON_ERR, SF_CONN_INVALID_TACHYON_RECORD, SF_CONN_LDAP_CONNECT, SF_CONN_LOST_NM, SF_CONN_NM_API_ERR, SF_CONN_PDU_NULL, SF_CONN_POLL_ERR, SF_CONN_SNMP_SESS_OPEN_FAIL, SF_CONN_TIMED_OUT, SF_DATA_AGGR_ERROR, SF_DATA_ATTR_CREATE, SF_DATA_ATTR_PARSE, SF_DATA_ATTR_SHIFT, SF_DATA_CANNOT_ENCODE, SF_DATA_CANT_ACK, SF_DATA_CANT_ENCODE, SF_DATA_CONV_STR_TO_N, SF_DATA_CONV_TO_STR, SF_DATA_CONVERT_ATTR, SF_DATA_DATA_EXPIRED, SF_DATA_DATA_MISSING, SF_DATA_DATA_PROC_ERR, SF_DATA_ENCODE_ERR, SF_DATA_ERR_CREATE, SF_DATA_ERR_SEND_ACK, SF_DATA_ERROR_IN_NPL, SF_DATA_ERROR_ON_ACK, SF_DATA_FILE_DATA, SF_DATA_FILE_PROC_ERR, SF_DATA_FORMAT_ERROR, SF_DATA_IE_INVALID, SF_DATA_IE_MISSING, SF_DATA_INPUT_INVALID, SF_DATA_INV_ATT_TYPE, SF_DATA_INV_ATTR_NPL, SF_DATA_INV_RECORD, SF_DATA_INV_TRAF_VOL, SF_DATA_JDBC_DRIVER_ERR, SF_DATA_KEY_CREATE, SF_DATA_MISSING_ATTRS, SF_DATA_MSG_TOO_SMALL, SF_DATA_MSG_TYPE, SF_DATA_NAR_IS_NULL, SF_DATA_NO_DATA_FILE, SF_DATA_NO_OPT_IE, SF_DATA_REC_INCOMP, SF_DATA_RECORD_PROC, SF_DATA_RECORD_SAVE, SF_DATA_SRC_READ_ERR, SF_DATA_UNABLE_COMPLETE, SF_DATA_UNEXP_NAR, SF_DATA_UNEXPECTED, SF_DATA_VAL_NOT_FOUND, SF_DATA_WRONG_DECODER, SF_INIT_DB_CON_ERR, SF_INIT_DIR_CON_ERR, SF_INIT_IO_ERR, SF_INIT_LDM, SF_INIT_LDM_RUN, SF_INIT_NODE_CONFIG, SF_INIT_NODE_CREATION, SF_INIT_NODE_INIT, SF_INIT_NODE_START, SF_INIT_RDM, SF_INIT_RDM_RUN, SF_INIT_REG_ERROR, SF_INIT_RULE_LOAD_ERR, SF_INIT_SOCKET_CREATE, SF_INIT_SOCKET_INIT, SF_INT_ERR_ETRACE, SF_INT_ERR_EXCEPTION, SF_INT_ERR_EXPIRE_ERR, SF_INT_ERR_FIELD_NULL, SF_INT_ERR_PROC_ERR, SF_INT_ERR_SHUTDOWN, SF_NC_ERR_IN_NODE, SF_NC_ERR_MNG_SERVER, SF_NC_ERR_NODE_STATE, SF_NC_ERR_PROC_DATA, SF_NC_ERR_RESTARTING, SF_NC_ERR_STARTING, SF_NC_ERR_STOPPING, SF_NC_ERR_UNHEALTHY, SF_NC_NODE_CONF_ERROR, SF_NC_NODE_SHUTDOWN, SF_RES_CPU_MAJOR, SF_RES_CPU_MINOR, SF_RES_CPU_USAGE_ERR, SF_RES_DISK_CRITICAL, SF_RES_DISK_MINOR, SF_RES_DISK_STATUS, SF_RES_DISK_USAGE, SF_RES_ERR_DATA_READ, SF_RES_ERR_DATA_REM, SF_RES_ERR_DB_CLOSE, SF_RES_ERR_DB_OP, SF_RES_ERR_DEL_ENTRY, SF_RES_ERR_DIR_CLOSE, SF_RES_ERR_DIR_CREATE, SF_RES_ERR_DIR_DELETE, SF_RES_ERR_DIR_OPEN, SF_RES_ERR_DIR_PROC, SF_RES_ERR_DIR_READ, SF_RES_ERR_DIR_WRITE, SF_RES_ERR_ENT_CREATE, SF_RES_ERR_FILE_CLOSE, SF_RES_ERR_FILE_CREAT, SF_RES_ERR_FILE_DEL, SF_RES_ERR_FILE_MOVE, SF_RES_ERR_FILE_NAME, SF_RES_ERR_FILE_OPEN, SF_RES_ERR_FILE_PROC, SF_RES_ERR_FILE_READ, SF_RES_ERR_FILE_REN, SF_RES_ERR_FILE_WRITE, SF_RES_ERR_IN_TRANS, SF_RES_ERR_INST_CLASS, SF_RES_ERR_INST_REC, SF_RES_ERR_IO_ERR, SF_RES_ERR_OPEN_TRANS, SF_RES_ERR_READ_DU, SF_RES_ERR_SOCK_CLOSE, SF_RES_ERR_SOCK_CREAT, SF_RES_ERR_SOCK_OPEN, SF_RES_ERR_SOCK_WRITE, SF_RES_ERR_TABLE_ACC, SF_RES_ERR_TABLE_CLOS, SF_RES_ERR_TABLE_OPEN, SF_RES_ERR_TIMER_SCHED, SF_RES_ERR_USING_Q, SF_RES_IS_NULL, SF_RES_MEM_MAJOR, SF_RES_MEM_WARNING, SF_RES_NO_LICENSE, SF_RES_NODE_STATE_R, SF_RES_NODE_STATE_W, SF_SEC_NO_USER_AUTH, SF_SEC_USER_AUTH_FAIL, SF_SEC_USER_CFG_FAIL, SF_SRV_CNTRL, SF_UND_INTERRUPTED, SF_UND_SHUTDOWN_ERR
Fields inherited from interface com.nt.udc.ndk.node.PropertyIfc
ENVIRONMENT, RUNTIME
-
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor; instantiates objects necessary to define the DCNodeTypeIfc methods.FileEINode
(String[] args) Constructor for the class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
backup()
Empty implementationvoid
Returns the name of the config data class for this node.Returns the name of the Config Data GUI class for this node.protected FileEINodeHandler
Returns the type name of the EI node.Returns the stream handler's node performance objectprotected void
protected void
protected void
protected void
boolean
This method is used to check the transport's state of health.void
movebackinProgFile
(String filename) void
Call that reconfigures an EINode object for warm restart.void
shutdown()
Performs all necessary functions to stop this node and any processes that it has created.Methods inherited from class com.nt.udc.ndk.node.EINode
getFieldProcessor, getFieldProcessor, getFieldProcessorThread, getMajorType, getTransport, getTransport, getTransportThread, getTransportThread, initDCStreamHandler, initDCStreamHandler, isNodeStateUsed, setFieldProcessor, setFieldProcessor, setFieldProcessorThread, setTransport, setTransport, setTransportThread, setTransportThread, setTransportThread, shutdownFieldProcessor, startup
Methods inherited from class com.nt.udc.ndk.node.DCNode
addNodeEventListener, clearStatus, clearStatus, clearStatus, createCounters, getAndResetRecordStatistics, getBackupDir, getConfig, getConfigDir, getConfigFile, getDCNodeType, getDCStreamHandler, getDCStreamHandler, getDiscardedStatsProcessor, getDisplayString, getDuplicateStatsProcessor, getHomeDir, getInputStatsProcessor, getItem, getLogDir, getLogger, getNodeClass, getNodeEventListeners, getNodeId, getNodeStateManager, getOutputStatsProcessor, getProperty, getPropertyKeys, getPropertyTypes, getRejectTransactionId, getScratchDir, getStateManagementType, getStateManager, getStatus, getStoredStatsProcessor, getStreamHandler, getStreamHandler, getSuspenseDir, initialize, inputMonitoringCallback, inputMonitoringPollInputCounter, isDebugEnabled, isInfoEnabled, isNodeStateImplemented, isReconfigPending, isReconfiguring, isRejectTransaction, isShutdown, isStateUsed, logCritical, logDebug, logError, logInfo, logMajor, logMinor, logTrace, logWarning, logWarning, registerThreadForHealthMonitoring, rejectTransaction, restoreState, saveState, saveState, setConfig, setDCStreamHandler, setDCStreamHandler, setIsReconfiguringFlag, setItem, setProperty, setSNMPTrapGenerator, setStreamHandler, setStreamHandler, shutdownDCStreamHandler, shuttingDown, unregisterThreadFromHealthMonitoring, warmRestartImplemented
-
Field Details
-
minorType
- See Also:
-
configDataGUIClass
- See Also:
-
configDataClass
- See Also:
-
fileduplicateCheck
-
fileSeqCheck
-
transport
-
fileHandler
-
fileHndlr
-
nplFile
-
no_of_threads
protected int no_of_threads -
mtChecked
protected boolean mtChecked -
isOrdered
protected boolean isOrdered -
fdChecked
protected boolean fdChecked -
file_expiry_time
protected int file_expiry_time -
fsChecked
protected boolean fsChecked -
fileSuffix
-
ftpFileTracker
-
ioLock
protected com.nt.common.util.SMGLock ioLockUsed to properly shut down all threads. This object serves as a lock that the EI must obtain before interrupting the transport thread. This prevents the EI from interrupting the transport thread in the middle of any I/O operations (like writing NAR files or writing scratch files). -
threadManager
-
fileCycler
-
fileLevelTransaction
protected boolean fileLevelTransaction -
pattern
-
-
Constructor Details
-
FileEINode
public FileEINode()Default Constructor; instantiates objects necessary to define the DCNodeTypeIfc methods. -
FileEINode
Constructor for the class. Calls the super class EINode with the given array of arguments.- Parameters:
args
- Arguments to be passed to the DCNode super class.- Throws:
NodeStartException
-
-
Method Details
-
getFileEINodeHandler
-
initConfig
- Throws:
NodeStartException
-
initFieldProcessor
- Throws:
NodeStartException
-
initFileHandler
- Throws:
NodeStartException
-
initTransport
- Throws:
NodeStartException
-
backup
public void backup()Description copied from class:DCNode
Empty implementation -
reconfigure
public void reconfigure()Description copied from class:EINode
Call that reconfigures an EINode object for warm restart. This method performs node reconfiguration processing specific to an EINode object. Derived classes that need to perform their own reconfiguration processing should overridereconfigure()
and then call this method from there. A flag is set in the DCNode base class indicating this node is in the reconfiguration state. The most derived class should use thesetIsReconfiguringFlag
method just before returning from itsreconfigure()
method to set the reconfiguration state to false.- Specified by:
reconfigure
in interfaceAdminIfc
- Overrides:
reconfigure
in classEINode
-
shutdown
public void shutdown()Description copied from class:DCNode
Performs all necessary functions to stop this node and any processes that it has created. -
getMinorType
Returns the type name of the EI node.- Specified by:
getMinorType
in classDCNode
- Returns:
- Returns the minor type identifier for this node.
-
getConfigDataGuiClass
Returns the name of the Config Data GUI class for this node.- Specified by:
getConfigDataGuiClass
in classDCNode
- Returns:
- Returns the class name of the DCNodeConfigGUI object used by the node.
-
getConfigDataClass
Returns the name of the config data class for this node.- Overrides:
getConfigDataClass
in classDCNode
- Returns:
- "
com.nt.udc.ndk.gui.DCNodeConfigData
"
-
getFileHandler
-
isHealthy
public boolean isHealthy()Description copied from class:EINode
This method is used to check the transport's state of health. The criterion for determining the node's health is based on the transport's health and whether all registered threads are alive. It is to be overridden by subclasses.- Specified by:
isHealthy
in interfaceNodeHealthIfc
- Overrides:
isHealthy
in classEINode
- Returns:
- true if the transport is healthy, false otherwise
-
getPerformanceMetrics
Description copied from class:DCNode
Returns the stream handler's node performance object- Specified by:
getPerformanceMetrics
in interfaceAdminIfc
- Overrides:
getPerformanceMetrics
in classDCNode
- Returns:
- DCNodePerformanceIfc object
-
deleteLockFiles
public void deleteLockFiles() -
movebackinProgFile
-
getLocalDir
-