public class LoggingRegistry extends Object
Modifier and Type | Method and Description |
---|---|
String |
dump(boolean includeGeneral)
Returns the contents of the Registry map as a string.
|
LoggingObjectInterface |
findExistingLoggingSource(LoggingObjectInterface loggingObject)
Finds a Existing LoggingObjectInterface in the registry using the LoggingObject's equals method.
|
static LoggingRegistry |
getInstance() |
Date |
getLastModificationTime() |
List<String> |
getLogChannelChildren(String parentLogChannelId)
Searches for a LogChannel and returns a list of children IDs.
|
LogChannelFileWriterBuffer |
getLogChannelFileWriterBuffer(String id)
Searches and returns LogChannelFileWriterBuffer object based on buffer's LogChannelID.
|
protected Set<String> |
getLogChannelFileWriterBufferIds()
Returns a Set of LogChannelIds associated with a FileWriterBuffer which includes a parent and its children.
|
LoggingObjectInterface |
getLoggingObject(String logChannelId)
Returns a LoggingObjectInterface based on a LogChannelID which is the key for the LoggingRegistry.
|
Map<String,LoggingObjectInterface> |
getMap()
Deprecated.
This is unsafe call and references to this method will be remove.
|
void |
registerLogChannelFileWriterBuffer(LogChannelFileWriterBuffer fileWriterBuffer)
Registers a LogChannelFileWriterBuffer with the registry.
|
String |
registerLoggingSource(Object object)
Register Method for objects that implement the LoggingObjectInterface which adds them to the LoggingRegistry.
|
String |
registerLoggingSource(Object object,
boolean isPurgeable)
Register Method for objects that implement the LoggingObjectInterface which adds them to the LoggingRegistry,
Includes a flag to identify loggingObjects that should not be removed from the registry i.e.
|
void |
removeIncludingChildren(String logChannelId)
Removes a LoggingObject entry and all its children, based on a LogChannelID.
|
void |
removeLogChannelFileWriterBuffer(String id)
Removes a LogChannelFileWriterBuffer by LogChannelId.
|
void |
removeOrphans()
Cleans up internal map of children that do not have parent in the main registry map.
|
void |
reset()
Resets all internal memory objects and counters.
|
void |
updateFromProperties()
Updates Class variables from the systemProperties / kettle.properties.
|
public static LoggingRegistry getInstance()
public String registerLoggingSource(Object object)
object
- the object to register.public String registerLoggingSource(Object object, boolean isPurgeable)
object
- the object to register.isPurgeable
- true will flag the object to be purged if needed.public LoggingObjectInterface findExistingLoggingSource(LoggingObjectInterface loggingObject)
loggingObject
- the object to search for.public LoggingObjectInterface getLoggingObject(String logChannelId)
logChannelId
- the logChannelID to search for.@Deprecated public Map<String,LoggingObjectInterface> getMap()
public void updateFromProperties()
public List<String> getLogChannelChildren(String parentLogChannelId)
parentLogChannelId
- The ID of the parent to search for.public Date getLastModificationTime()
public String dump(boolean includeGeneral)
includeGeneral
- Flag when true includes LoggingObjects of type GENERAL.public void removeIncludingChildren(String logChannelId)
logChannelId
- LogChannelID of the parent object to remove.public void removeOrphans()
public void registerLogChannelFileWriterBuffer(LogChannelFileWriterBuffer fileWriterBuffer)
fileWriterBuffer
- Object to register.public LogChannelFileWriterBuffer getLogChannelFileWriterBuffer(String id)
id
- LogChannelID to search for.protected Set<String> getLogChannelFileWriterBufferIds()
public void removeLogChannelFileWriterBuffer(String id)
id
- LogChannelId of the object to remove.public void reset()
Copyright © 2020 Hitachi Vantara. All rights reserved.