Package com.powsybl.iidm.network
Class MultiThreadReporterContext
java.lang.Object
com.powsybl.iidm.network.AbstractReporterContext
com.powsybl.iidm.network.MultiThreadReporterContext
- All Implemented Interfaces:
ReporterContext
Multi-thread ReporterContext
's implementation.
To avoid memory leaks, this context must be closed (with the close()
method) after usage.
- Author:
- Olivier Perrin <olivier.perrin at rte-france.com>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Return a descending iterator on the elements (first pushed first)Get the currentReporter
.void
pushReporter
(Reporter reporter) Use the givenReporter
instead of the current one.
The reporters are stacked and the previous one should be restored later usingReporterContext.popReporter()
.Methods inherited from class com.powsybl.iidm.network.AbstractReporterContext
copyReporters, peekReporter
-
Constructor Details
-
MultiThreadReporterContext
public MultiThreadReporterContext() -
MultiThreadReporterContext
-
-
Method Details
-
getReporter
Description copied from interface:ReporterContext
Get the currentReporter
.- Returns:
- the last defined
Reporter
- See Also:
-
pushReporter
Description copied from interface:ReporterContext
Use the givenReporter
instead of the current one.
The reporters are stacked and the previous one should be restored later usingReporterContext.popReporter()
.- Parameters:
reporter
- The new reporter to use.- See Also:
-
popReporter
Description copied from interface:ReporterContext
- Returns:
- the current
Reporter
- See Also:
-
close
public void close() -
descendingIterator
Description copied from class:AbstractReporterContext
Return a descending iterator on the elements (first pushed first)
- Specified by:
descendingIterator
in classAbstractReporterContext
- Returns:
- an Iterator on the elements
-