Class AppenderControlArraySet
java.lang.Object
org.apache.logging.log4j.core.config.AppenderControlArraySet
Data structure with similar semantics to CopyOnWriteArraySet, but giving direct access to the underlying array.
- Since:
- 2.6
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanadd(AppenderControl control) Adds an AppenderControl to this set.asMap()Returns all Appenders as a Map.clear()Atomically sets the values to an empty array and returns the old array.get()Returns the underlying array.booleanisEmpty()Removes the AppenderControl with the specific name and returns it (ornullif no such appender existed).toString()
- 
Constructor Details- 
AppenderControlArraySetpublic AppenderControlArraySet()
 
- 
- 
Method Details- 
addAdds an AppenderControl to this set. If this set already contains the element, the call leaves the set unchanged and returns false.- Parameters:
- control- The AppenderControl to add.
- Returns:
- true if this set did not already contain the specified element
 
- 
removeRemoves the AppenderControl with the specific name and returns it (ornullif no such appender existed).- Parameters:
- name- The name of the AppenderControl to remove
- Returns:
- the removed AppenderControl or null
 
- 
asMapReturns all Appenders as a Map.- Returns:
- a Map with the Appender name as the key and the Appender as the value.
 
- 
clearAtomically sets the values to an empty array and returns the old array.- Returns:
- the contents before this collection was cleared.
 
- 
isEmptypublic boolean isEmpty()
- 
getReturns the underlying array.- Returns:
- the array supporting this collection
 
- 
toString
 
-