| Modifier and Type | Field and Description |
|---|---|
protected List<ScheduledFuture<?>> |
scheduledFutures |
| Constructor and Description |
|---|
ContextBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addScheduledFuture(ScheduledFuture<?> scheduledFuture) |
long |
getBirthTime()
The time at which this context was created, expressed in
millisecond elapsed since the epoch (1.1.1970).
|
Object |
getConfigurationLock()
Object used for synchronization purposes.
|
Map<String,String> |
getCopyOfPropertyMap()
Get a copy of the property map
|
ExecutorService |
getExecutorService()
Every context has an ExecutorService which be invoked to execute certain
tasks in a separate thread.
|
String |
getName()
Contexts are named objects.
|
Object |
getObject(String key)
A Context can act as a store for various objects used by LOGBack
components.
|
String |
getProperty(String key)
Given a key, return the corresponding property value.
|
ScheduledExecutorService |
getScheduledExecutorService()
Returns the ScheduledExecutorService for this context.
|
List<ScheduledFuture<?>> |
getScheduledFutures() |
StatusManager |
getStatusManager()
Return the StatusManager instance in use.
|
protected void |
initCollisionMaps() |
boolean |
isStarted() |
void |
putObject(String key,
Object value)
Store an object under 'key'.
|
void |
putProperty(String key,
String val)
Set a property of this context.
|
void |
register(LifeCycle component)
Register a component that participates in the context's life cycle.
|
void |
removeObject(String key) |
void |
reset()
Clear the internal objectMap and all properties.
|
void |
setName(String name)
The context name can be set only if it is not already set, or if the
current name is the default context name, namely "default", or if the
current name and the old name are the same.
|
void |
setStatusManager(StatusManager statusManager)
Set the
StatusManager for this context. |
void |
start() |
void |
stop() |
String |
toString() |
protected List<ScheduledFuture<?>> scheduledFutures
public StatusManager getStatusManager()
ContextgetStatusManager in interface ContextStatusManager instance in use.public void setStatusManager(StatusManager statusManager)
StatusManager for this context. Note that by default this
context is initialized with a BasicStatusManager. A null value for
the 'statusManager' argument is not allowed.
A malicious attacker can set the status manager to a dummy instance, disabling internal error reporting.
statusManager - the new status managerpublic Map<String,String> getCopyOfPropertyMap()
ContextgetCopyOfPropertyMap in interface ContextgetCopyOfPropertyMap in interface PropertyContainerpublic void putProperty(String key, String val)
ContextputProperty in interface Contextprotected void initCollisionMaps()
public String getProperty(String key)
getProperty in interface ContextgetProperty in interface PropertyContainerkey - public Object getObject(String key)
Contextpublic void putObject(String key, Object value)
Contextpublic void removeObject(String key)
public String getName()
Contextpublic void reset()
public void setName(String name) throws IllegalStateException
setName in interface ContextIllegalStateException - if the context already has a name, other than "default".public long getBirthTime()
ContextgetBirthTime in interface Contextpublic Object getConfigurationLock()
ContextgetConfigurationLock in interface Contextpublic ExecutorService getExecutorService()
ContextgetExecutorService in interface Contextpublic ScheduledExecutorService getScheduledExecutorService()
ContextgetScheduledExecutorService in interface Contextpublic void register(LifeCycle component)
ContextAll components registered via this method will be stopped and removed from the context when the context is reset.
public void addScheduledFuture(ScheduledFuture<?> scheduledFuture)
addScheduledFuture in interface Contextpublic List<ScheduledFuture<?>> getScheduledFutures()
Copyright © 2005–2021 QOS.ch. All rights reserved.