Package com.powsybl.iidm.network
Class MultiThreadReportNodeContext
java.lang.Object
com.powsybl.iidm.network.AbstractReportNodeContext
com.powsybl.iidm.network.MultiThreadReportNodeContext
- All Implemented Interfaces:
ReportNodeContext
Multi-thread ReportNodeContext
'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()
protected Iterator<ReportNode>
Return a descending iterator on the elements (first pushed first)Get the currentReportNode
.Pop the currentReportNode
(defined viaReportNode
) and restore the previous one.void
pushReportNode
(ReportNode reportNode) Use the givenReportNode
instead of the current one.
The reportNodes are stacked and the previous one should be restored later usingReportNodeContext.popReportNode()
.Methods inherited from class com.powsybl.iidm.network.AbstractReportNodeContext
copyReportNodes, peekReportNode
-
Constructor Details
-
MultiThreadReportNodeContext
public MultiThreadReportNodeContext() -
MultiThreadReportNodeContext
-
-
Method Details
-
getReportNode
Description copied from interface:ReportNodeContext
Get the currentReportNode
.- Returns:
- the last defined
ReportNode
- See Also:
-
pushReportNode
Description copied from interface:ReportNodeContext
Use the givenReportNode
instead of the current one.
The reportNodes are stacked and the previous one should be restored later usingReportNodeContext.popReportNode()
.- Parameters:
reportNode
- The new reportNode to use.- See Also:
-
popReportNode
Description copied from interface:ReportNodeContext
Pop the currentReportNode
(defined viaReportNode
) and restore the previous one.- Returns:
- the current
ReportNode
- See Also:
-
close
public void close() -
descendingIterator
Description copied from class:AbstractReportNodeContext
Return a descending iterator on the elements (first pushed first)
- Specified by:
descendingIterator
in classAbstractReportNodeContext
- Returns:
- an Iterator on the elements
-