Class AbstractConfiguration
- java.lang.Object
-
- org.apache.logging.log4j.core.AbstractLifeCycle
-
- org.apache.logging.log4j.core.filter.AbstractFilterable
-
- org.apache.logging.log4j.core.config.AbstractConfiguration
-
- All Implemented Interfaces:
Configuration,Filterable,LifeCycle,LifeCycle2
- Direct Known Subclasses:
BuiltConfiguration,CompositeConfiguration,DefaultConfiguration,JsonConfiguration,Log4j1Configuration,NullConfiguration,XmlConfiguration
public abstract class AbstractConfiguration extends AbstractFilterable implements Configuration
The base Configuration. Many configuration implementations will extend this class.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
AbstractFilterable.Builder<B extends AbstractFilterable.Builder<B>>
-
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectadvertisementprivate AdvertiseradvertiserThe Advertiser which exposes appender configurations to external systems.private NodeadvertiserNodeprivate java.util.concurrent.ConcurrentMap<java.lang.String,Appender>appendersprivate AsyncLoggerConfigDisruptorasyncLoggerConfigDisruptorprivate AsyncWaitStrategyFactoryasyncWaitStrategyFactoryprivate static intBUF_SIZEprivate java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object>componentMapprivate ConfigurationSchedulerconfigurationSchedulerprivate ConfigurationSourceconfigurationSourceprivate StrSubstitutorconfigurationStrSubstitutorprivate java.util.List<CustomLevelConfig>customLevelsprotected booleanisShutdownHookEnabledShutdown hook is enabled by default.protected java.util.List<ConfigurationListener>listenersListeners for configuration changes.private java.util.concurrent.ConcurrentMap<java.lang.String,LoggerConfig>loggerConfigsprivate java.lang.ref.WeakReference<LoggerContext>loggerContextprivate java.lang.Stringnameprivate NanoClocknanoClockprotected PluginManagerpluginManagerThe plugin manager.protected java.util.List<java.lang.String>pluginPackagesPackages found in configuration "packages" attribute.private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String>propertyMapprivate LoggerConfigrootprotected NoderootNodeThe root node of the configuration.private StrSubstitutorruntimeStrSubstitutorprotected ScriptManagerscriptManagerThe Script manager.protected longshutdownTimeoutMillisShutdown timeout in milliseconds.private InterpolatortempLookupprivate WatchManagerwatchManager-
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
-
Fields inherited from interface org.apache.logging.log4j.core.config.Configuration
CONTEXT_PROPERTIES
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractConfiguration(LoggerContext loggerContext, ConfigurationSource configurationSource)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAppender(Appender appender)Adds an Appender to the configuration.voidaddComponent(java.lang.String componentName, java.lang.Object obj)voidaddListener(ConfigurationListener listener)Add a listener for changes on the configuration.voidaddLogger(java.lang.String loggerName, LoggerConfig loggerConfig)Add a loggerConfig.voidaddLoggerAppender(Logger logger, Appender appender)Associates an Appender with a LoggerConfig.voidaddLoggerFilter(Logger logger, Filter filter)Associates a Filter with a LoggerConfig.protected voidcreateAdvertiser(java.lang.String advertiserString, ConfigurationSource configSource, byte[] buffer, java.lang.String contentType)voidcreateConfiguration(Node node, LogEvent event)private static java.util.Collection<?>createPluginCollection(Node node)private static java.util.Map<java.lang.String,?>createPluginMap(Node node)java.lang.ObjectcreatePluginObject(PluginType<?> type, Node node)This method is used by Arbiters to create specific children.private java.lang.ObjectcreatePluginObject(PluginType<?> type, Node node, LogEvent event)Invokes a static factory method to either create the desired object or to create a builder object that creates the desired object.protected voiddoConfigure()AdvertisergetAdvertiser()<T extends Appender>
TgetAppender(java.lang.String appenderName)Returns the Appender with the specified name.java.util.Map<java.lang.String,Appender>getAppenders()Returns a Map containing all the Appenders and their name.private java.util.List<Appender>getAsyncAppenders(Appender[] all)AsyncLoggerConfigDelegategetAsyncLoggerConfigDelegate()Returns theAsyncLoggerConfigDelegateshared by allAsyncLoggerConfiginstances defined in this Configuration.AsyncWaitStrategyFactorygetAsyncWaitStrategyFactory()Returns theAsyncWaitStrategyFactorydefined in this Configuration; this factory is used to create the LMAX disruptorWaitStrategyused by the disruptor ringbuffer for Async Loggers.<T> TgetComponent(java.lang.String componentName)ConfigurationSourcegetConfigurationSource()Returns the source of this configuration.StrSubstitutorgetConfigurationStrSubstitutor()java.util.List<CustomLevelConfig>getCustomLevels()Returns a list of descriptors of the custom levels defined in the current configuration.static LevelgetDefaultLevel()protected LevelgetDefaultStatus()LoggerConfiggetLogger(java.lang.String loggerName)Returns the LoggerConfig with the specified name.LoggerConfiggetLoggerConfig(java.lang.String loggerName)Locates the appropriate LoggerConfig for a Logger name.LoggerContextgetLoggerContext()Gets the logger context.java.util.Map<java.lang.String,LoggerConfig>getLoggers()Returns a Map of all the LoggerConfigs.java.lang.StringgetName()Returns the name of the configuration.NanoClockgetNanoClock()Returns theNanoClockinstance for this configuration.PluginManagergetPluginManager()java.util.List<java.lang.String>getPluginPackages()Returns the list of packages to scan for plugins for this Configuration.java.util.Map<java.lang.String,java.lang.String>getProperties()ReliabilityStrategygetReliabilityStrategy(LoggerConfig loggerConfig)LoggerConfiggetRootLogger()Returns the root Logger.NodegetRootNode()ConfigurationSchedulergetScheduler()ScriptManagergetScriptManager()longgetShutdownTimeoutMillis()StrSubstitutorgetStrSubstitutor()WatchManagergetWatchManager()Return the WatchManager.private booleanhasAsyncLoggers()voidinitialize()Initialize the configuration.protected voidinitializeWatchers(Reconfigurable reconfigurable, ConfigurationSource configSource, int monitorIntervalSeconds)booleanisShutdownHookEnabled()private voidmonitorSource(Reconfigurable reconfigurable, ConfigurationSource configSource)protected voidpreConfigure(Node node)protected voidprocessConditionals(Node node)Process conditions by evaluating them and including the children of conditions that are true and discarding those that are not.protected java.util.List<Node>processSelect(Node selectNode, PluginType<?> type)Handle Select nodes.voidremoveAppender(java.lang.String appenderName)Remove an Appender.voidremoveListener(ConfigurationListener listener)Remove a ConfigurationListener.voidremoveLogger(java.lang.String loggerName)Remove a LoggerConfig.voidsetAdvertiser(Advertiser advertiser)voidsetLoggerAdditive(Logger logger, boolean additive)Marks a LoggerConfig as additive.voidsetName(java.lang.String name)Set the name of the configuration.voidsetNanoClock(NanoClock nanoClock)Sets theNanoClockinstance for this configuration.private voidsetParents()voidsetPluginManager(PluginManager pluginManager)voidsetScriptManager(ScriptManager scriptManager)protected voidsetToDefault()voidsetup()private voidsetupAdvertisement()voidstart()Start the configuration.booleanstop(long timeout, java.util.concurrent.TimeUnit timeUnit)Tear down the configuration.protected static byte[]toByteArray(java.io.InputStream is)Reads an InputStream using buffered reads into a byte array buffer.-
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, stop
-
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, getStatusLogger, hashCodeImpl, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.logging.log4j.core.filter.Filterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter
-
-
-
-
Field Detail
-
BUF_SIZE
private static final int BUF_SIZE
- See Also:
- Constant Field Values
-
rootNode
protected Node rootNode
The root node of the configuration.
-
listeners
protected final java.util.List<ConfigurationListener> listeners
Listeners for configuration changes.
-
pluginPackages
protected final java.util.List<java.lang.String> pluginPackages
Packages found in configuration "packages" attribute.
-
pluginManager
protected PluginManager pluginManager
The plugin manager.
-
isShutdownHookEnabled
protected boolean isShutdownHookEnabled
Shutdown hook is enabled by default.
-
shutdownTimeoutMillis
protected long shutdownTimeoutMillis
Shutdown timeout in milliseconds.
-
scriptManager
protected ScriptManager scriptManager
The Script manager.
-
advertiser
private Advertiser advertiser
The Advertiser which exposes appender configurations to external systems.
-
advertiserNode
private Node advertiserNode
-
advertisement
private java.lang.Object advertisement
-
name
private java.lang.String name
-
appenders
private java.util.concurrent.ConcurrentMap<java.lang.String,Appender> appenders
-
loggerConfigs
private java.util.concurrent.ConcurrentMap<java.lang.String,LoggerConfig> loggerConfigs
-
customLevels
private java.util.List<CustomLevelConfig> customLevels
-
propertyMap
private final java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> propertyMap
-
tempLookup
private final Interpolator tempLookup
-
runtimeStrSubstitutor
private final StrSubstitutor runtimeStrSubstitutor
-
configurationStrSubstitutor
private final StrSubstitutor configurationStrSubstitutor
-
root
private LoggerConfig root
-
componentMap
private final java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> componentMap
-
configurationSource
private final ConfigurationSource configurationSource
-
configurationScheduler
private final ConfigurationScheduler configurationScheduler
-
watchManager
private final WatchManager watchManager
-
asyncLoggerConfigDisruptor
private AsyncLoggerConfigDisruptor asyncLoggerConfigDisruptor
-
asyncWaitStrategyFactory
private AsyncWaitStrategyFactory asyncWaitStrategyFactory
-
nanoClock
private NanoClock nanoClock
-
loggerContext
private final java.lang.ref.WeakReference<LoggerContext> loggerContext
-
-
Constructor Detail
-
AbstractConfiguration
protected AbstractConfiguration(LoggerContext loggerContext, ConfigurationSource configurationSource)
Constructor.
-
-
Method Detail
-
getConfigurationSource
public ConfigurationSource getConfigurationSource()
Description copied from interface:ConfigurationReturns the source of this configuration.- Specified by:
getConfigurationSourcein interfaceConfiguration- Returns:
- the source of this configuration, never
null, but may beConfigurationSource.NULL_SOURCEorConfigurationSource.COMPOSITE_SOURCE
-
getPluginPackages
public java.util.List<java.lang.String> getPluginPackages()
Description copied from interface:ConfigurationReturns the list of packages to scan for plugins for this Configuration.- Specified by:
getPluginPackagesin interfaceConfiguration- Returns:
- the list of plugin packages.
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getPropertiesin interfaceConfiguration
-
getScriptManager
public ScriptManager getScriptManager()
- Specified by:
getScriptManagerin interfaceConfiguration
-
setScriptManager
public void setScriptManager(ScriptManager scriptManager)
-
getPluginManager
public PluginManager getPluginManager()
-
setPluginManager
public void setPluginManager(PluginManager pluginManager)
-
getWatchManager
public WatchManager getWatchManager()
Description copied from interface:ConfigurationReturn the WatchManager.- Specified by:
getWatchManagerin interfaceConfiguration- Returns:
- the WatchManager.
-
getScheduler
public ConfigurationScheduler getScheduler()
- Specified by:
getSchedulerin interfaceConfiguration
-
getRootNode
public Node getRootNode()
-
getAsyncLoggerConfigDelegate
public AsyncLoggerConfigDelegate getAsyncLoggerConfigDelegate()
Description copied from interface:ConfigurationReturns theAsyncLoggerConfigDelegateshared by allAsyncLoggerConfiginstances defined in this Configuration.- Specified by:
getAsyncLoggerConfigDelegatein interfaceConfiguration- Returns:
- the
AsyncLoggerConfigDelegate
-
getAsyncWaitStrategyFactory
public AsyncWaitStrategyFactory getAsyncWaitStrategyFactory()
Description copied from interface:ConfigurationReturns theAsyncWaitStrategyFactorydefined in this Configuration; this factory is used to create the LMAX disruptorWaitStrategyused by the disruptor ringbuffer for Async Loggers.- Specified by:
getAsyncWaitStrategyFactoryin interfaceConfiguration- Returns:
- the
AsyncWaitStrategyFactory
-
initialize
public void initialize()
Initialize the configuration.- Specified by:
initializein interfaceLifeCycle- Overrides:
initializein classAbstractLifeCycle
-
initializeWatchers
protected void initializeWatchers(Reconfigurable reconfigurable, ConfigurationSource configSource, int monitorIntervalSeconds)
-
monitorSource
private void monitorSource(Reconfigurable reconfigurable, ConfigurationSource configSource)
-
start
public void start()
Start the configuration.- Specified by:
startin interfaceLifeCycle- Overrides:
startin classAbstractFilterable
-
hasAsyncLoggers
private boolean hasAsyncLoggers()
-
stop
public boolean stop(long timeout, java.util.concurrent.TimeUnit timeUnit)Tear down the configuration.- Specified by:
stopin interfaceLifeCycle2- Overrides:
stopin classAbstractFilterable- Parameters:
timeout- the maximum time to waittimeUnit- the time unit of the timeout argument- Returns:
- true if the receiver was stopped cleanly and normally, false otherwise.
-
isShutdownHookEnabled
public boolean isShutdownHookEnabled()
- Specified by:
isShutdownHookEnabledin interfaceConfiguration
-
getShutdownTimeoutMillis
public long getShutdownTimeoutMillis()
- Specified by:
getShutdownTimeoutMillisin interfaceConfiguration
-
setup
public void setup()
-
getDefaultStatus
protected Level getDefaultStatus()
-
createAdvertiser
protected void createAdvertiser(java.lang.String advertiserString, ConfigurationSource configSource, byte[] buffer, java.lang.String contentType)
-
setupAdvertisement
private void setupAdvertisement()
-
getComponent
public <T> T getComponent(java.lang.String componentName)
- Specified by:
getComponentin interfaceConfiguration
-
addComponent
public void addComponent(java.lang.String componentName, java.lang.Object obj)- Specified by:
addComponentin interfaceConfiguration
-
preConfigure
protected void preConfigure(Node node)
-
processConditionals
protected void processConditionals(Node node)
Process conditions by evaluating them and including the children of conditions that are true and discarding those that are not.- Parameters:
node- The node to evaluate.
-
processSelect
protected java.util.List<Node> processSelect(Node selectNode, PluginType<?> type)
Handle Select nodes. This finds the first child condition that returns true and attaches its children to the parent of the Select Node. Other Nodes are discarded.- Parameters:
selectNode- The Select Node.type- The PluginType of the Select Node.- Returns:
- The list of Nodes to be added to the parent.
-
doConfigure
protected void doConfigure()
-
getDefaultLevel
public static Level getDefaultLevel()
-
setToDefault
protected void setToDefault()
-
setName
public void setName(java.lang.String name)
Set the name of the configuration.- Parameters:
name- The name.
-
getName
public java.lang.String getName()
Returns the name of the configuration.- Specified by:
getNamein interfaceConfiguration- Returns:
- the name of the configuration.
-
addListener
public void addListener(ConfigurationListener listener)
Add a listener for changes on the configuration.- Specified by:
addListenerin interfaceConfiguration- Parameters:
listener- The ConfigurationListener to add.
-
removeListener
public void removeListener(ConfigurationListener listener)
Remove a ConfigurationListener.- Specified by:
removeListenerin interfaceConfiguration- Parameters:
listener- The ConfigurationListener to remove.
-
getAppender
public <T extends Appender> T getAppender(java.lang.String appenderName)
Returns the Appender with the specified name.- Specified by:
getAppenderin interfaceConfiguration- Type Parameters:
T- The expected Appender type.- Parameters:
appenderName- The name of the Appender.- Returns:
- the Appender with the specified name or null if the Appender cannot be located.
-
getAppenders
public java.util.Map<java.lang.String,Appender> getAppenders()
Returns a Map containing all the Appenders and their name.- Specified by:
getAppendersin interfaceConfiguration- Returns:
- A Map containing each Appender's name and the Appender object.
-
addAppender
public void addAppender(Appender appender)
Adds an Appender to the configuration.- Specified by:
addAppenderin interfaceConfiguration- Parameters:
appender- The Appender to add.
-
getStrSubstitutor
public StrSubstitutor getStrSubstitutor()
- Specified by:
getStrSubstitutorin interfaceConfiguration
-
getConfigurationStrSubstitutor
public StrSubstitutor getConfigurationStrSubstitutor()
- Specified by:
getConfigurationStrSubstitutorin interfaceConfiguration
-
setAdvertiser
public void setAdvertiser(Advertiser advertiser)
- Specified by:
setAdvertiserin interfaceConfiguration
-
getAdvertiser
public Advertiser getAdvertiser()
- Specified by:
getAdvertiserin interfaceConfiguration
-
getReliabilityStrategy
public ReliabilityStrategy getReliabilityStrategy(LoggerConfig loggerConfig)
- Specified by:
getReliabilityStrategyin interfaceConfiguration
-
addLoggerAppender
public void addLoggerAppender(Logger logger, Appender appender)
Associates an Appender with a LoggerConfig. This method is synchronized in case a Logger with the same name is being updated at the same time. Note: This method is not used when configuring via configuration. It is primarily used by unit tests.- Specified by:
addLoggerAppenderin interfaceConfiguration- Parameters:
logger- The Logger the Appender will be associated with.appender- The Appender.
-
addLoggerFilter
public void addLoggerFilter(Logger logger, Filter filter)
Associates a Filter with a LoggerConfig. This method is synchronized in case a Logger with the same name is being updated at the same time. Note: This method is not used when configuring via configuration. It is primarily used by unit tests.- Specified by:
addLoggerFilterin interfaceConfiguration- Parameters:
logger- The Logger the Footer will be associated with.filter- The Filter.
-
setLoggerAdditive
public void setLoggerAdditive(Logger logger, boolean additive)
Marks a LoggerConfig as additive. This method is synchronized in case a Logger with the same name is being updated at the same time. Note: This method is not used when configuring via configuration. It is primarily used by unit tests.- Specified by:
setLoggerAdditivein interfaceConfiguration- Parameters:
logger- The Logger the Appender will be associated with.additive- True if the LoggerConfig should be additive, false otherwise.
-
removeAppender
public void removeAppender(java.lang.String appenderName)
Remove an Appender. First removes any associations between LoggerConfigs and the Appender, removes the Appender from this appender list and then stops the appender. This method is synchronized in case an Appender with the same name is being added during the removal.- Parameters:
appenderName- the name of the appender to remove.
-
getCustomLevels
public java.util.List<CustomLevelConfig> getCustomLevels()
Description copied from interface:ConfigurationReturns a list of descriptors of the custom levels defined in the current configuration. The returned list does not include custom levels that are defined in code with direct calls to
Level.forName(String, int).Note that the list does not include levels of previous configurations. For example, suppose a configuration contains custom levels A, B and C. The configuration is then modified to contain custom levels B, C and D. For the new configuration, this method will return only {B, C, D}, that is, only the custom levels defined in this configuration. The previously defined level A still exists (and can be obtained with
Level.getLevel(String)), it is just not in the current configuration.Level.values()will return {A, B, C, D and the built-in levels}.- Specified by:
getCustomLevelsin interfaceConfiguration- Returns:
- the custom levels defined in the current configuration
-
getLoggerConfig
public LoggerConfig getLoggerConfig(java.lang.String loggerName)
Locates the appropriate LoggerConfig for a Logger name. This will remove tokens from the package name as necessary or return the root LoggerConfig if no other matches were found.- Specified by:
getLoggerConfigin interfaceConfiguration- Parameters:
loggerName- The Logger name.- Returns:
- The located LoggerConfig.
-
getLoggerContext
public LoggerContext getLoggerContext()
Description copied from interface:ConfigurationGets the logger context.- Specified by:
getLoggerContextin interfaceConfiguration- Returns:
- the logger context.
-
getRootLogger
public LoggerConfig getRootLogger()
Returns the root Logger.- Specified by:
getRootLoggerin interfaceConfiguration- Returns:
- the root Logger.
-
getLoggers
public java.util.Map<java.lang.String,LoggerConfig> getLoggers()
Returns a Map of all the LoggerConfigs.- Specified by:
getLoggersin interfaceConfiguration- Returns:
- a Map with each entry containing the name of the Logger and the LoggerConfig.
-
getLogger
public LoggerConfig getLogger(java.lang.String loggerName)
Returns the LoggerConfig with the specified name.- Parameters:
loggerName- The Logger name.- Returns:
- The LoggerConfig or null if no match was found.
-
addLogger
public void addLogger(java.lang.String loggerName, LoggerConfig loggerConfig)Add a loggerConfig. The LoggerConfig must already be configured with Appenders, Filters, etc. After addLogger is called LoggerContext.updateLoggers must be called.- Specified by:
addLoggerin interfaceConfiguration- Parameters:
loggerName- The name of the Logger.loggerConfig- The LoggerConfig.
-
removeLogger
public void removeLogger(java.lang.String loggerName)
Remove a LoggerConfig.- Specified by:
removeLoggerin interfaceConfiguration- Parameters:
loggerName- The name of the Logger.
-
createConfiguration
public void createConfiguration(Node node, LogEvent event)
- Specified by:
createConfigurationin interfaceConfiguration
-
createPluginObject
public java.lang.Object createPluginObject(PluginType<?> type, Node node)
This method is used by Arbiters to create specific children.- Parameters:
type- The PluginType.node- The Node.- Returns:
- The created object or null;
-
createPluginObject
private java.lang.Object createPluginObject(PluginType<?> type, Node node, LogEvent event)
Invokes a static factory method to either create the desired object or to create a builder object that creates the desired object. In the case of a factory method, it should be annotated withPluginFactory, and each parameter should be annotated with an appropriate plugin annotation depending on what that parameter describes. Parameters annotated withPluginAttributemust be a type that can be converted from a string using one of theTypeConverters. Parameters withPluginElementmay be any plugin class or an array of a plugin class. Collections and Maps are currently not supported, although the factory method that is called can create these from an array. Plugins can also be created using a builder class that implementsBuilder. In that case, a static method annotated withPluginBuilderAttributeshould create the builder class, and the various fields in the builder class should be annotated similarly to the method parameters. However, instead of using PluginAttribute, one should usePluginBuilderAttributewhere the default value can be specified as the default field value instead of as an additional annotation parameter. In either case, there are also annotations for specifying aConfiguration(PluginConfiguration) or aNode(PluginNode). Although the happy path works, more work still needs to be done to log incorrect parameters. These will generally result in unhelpful InvocationTargetExceptions.- Parameters:
type- the type of plugin to create.node- the corresponding configuration node for this plugin to create.event- the LogEvent that spurred the creation of this plugin- Returns:
- the created plugin object or
nullif there was an error setting it up. - See Also:
PluginBuilder,PluginVisitor,TypeConverter
-
createPluginMap
private static java.util.Map<java.lang.String,?> createPluginMap(Node node)
-
createPluginCollection
private static java.util.Collection<?> createPluginCollection(Node node)
-
setParents
private void setParents()
-
toByteArray
protected static byte[] toByteArray(java.io.InputStream is) throws java.io.IOExceptionReads an InputStream using buffered reads into a byte array buffer. The given InputStream will remain open after invocation of this method.- Parameters:
is- the InputStream to read into a byte array buffer.- Returns:
- a byte array of the InputStream contents.
- Throws:
java.io.IOException- if thereadmethod of the provided InputStream throws this exception.
-
getNanoClock
public NanoClock getNanoClock()
Description copied from interface:ConfigurationReturns theNanoClockinstance for this configuration.- Specified by:
getNanoClockin interfaceConfiguration- Returns:
- the nano clock
-
setNanoClock
public void setNanoClock(NanoClock nanoClock)
Description copied from interface:ConfigurationSets theNanoClockinstance for this configuration.- Specified by:
setNanoClockin interfaceConfiguration- Parameters:
nanoClock- the new nano clock for this configuration. Must be non-null.
-
-