Class J9DDRDTFJUtils
java.lang.Object
com.ibm.j9ddr.view.dtfj.J9DDRDTFJUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Iterator
corruptIterator
(CorruptData data) Return an iterator which contains a single corrupt data itemstatic Iterator
static CorruptDataException
Go through the standard handleAsCorruptDataException method to convert the supplied error condition into a corrupt data exception as long as it is not present in the allow list AND especially for this method, if it is not a DataUnavailable.static CorruptDataException
handleAllButMemAccExAndDataUnavailAsCorruptDataException
(IProcess p, Throwable t, Class<?>[] allowlist) Go through the standard handleAsCorruptDataException method to convert the supplied error condition into a corrupt data exception as long as it is not present in the allow list AND especially for this method, if it is neither MemoryAccessException or DataUnavailable.static CorruptDataException
handleAllButMemAccExAsCorruptDataException
(IProcess p, Throwable t, Class<?>[] allowlist) Go through the standard handleAsCorruptDataException method to convert the supplied error condition into a corrupt data exception as long as it is not present in the allow list AND especially for this method, if it is not a MemoryAccessException.static CorruptData
Convert the supplied error condition into a CorruptData object and return it, typically for insertion into an iterator, or re-throw it if it is an instance of Error that we do not want to intercept.static CorruptDataException
Convert the supplied error condition into a corrupt data exception or re-throw it if it is an instance of Error that we do not want to intercept.static CorruptDataException
handleAsCorruptDataException
(IProcess p, Throwable t, Class<?>[] allowlist) Go through the standard handleAsCorruptDataException method to convert the supplied error condition into a corrupt data exception as long as it is not present in the allow list.static DataUnavailable
Handle the supplied error condition and ultimately surface it as a data unavailable exception.static J9DDRCorruptData
newCorruptData
(IProcess process) Create a j9ddr corrupt datastatic J9DDRCorruptData
newCorruptData
(IProcess process, CorruptDataException e) Create a j9ddr corrupt datastatic J9DDRCorruptData
newCorruptData
(IProcess process, String message) Create a j9ddr corrupt datastatic CorruptDataException
newCorruptDataException
(IProcess process, CorruptDataException e) Convert a j9ddr corrupt data exception into a DTFJ corrupt data exception
-
Constructor Details
-
J9DDRDTFJUtils
public J9DDRDTFJUtils()
-
-
Method Details
-
emptyIterator
-
corruptIterator
Return an iterator which contains a single corrupt data item- Parameters:
data
-- Returns:
-
newCorruptData
Create a j9ddr corrupt data- Parameters:
process
- the process from the dtfj contexte
- a DTFJ CDE- Returns:
- a j9ddr corrupt data
-
newCorruptData
Create a j9ddr corrupt data- Parameters:
process
- the process from the dtfj context- Returns:
- a j9ddr corrupt data
-
newCorruptData
Create a j9ddr corrupt data- Parameters:
process
- the process from the dtfj contextmessage
- message- Returns:
- a j9ddr corrupt data
-
newCorruptDataException
public static CorruptDataException newCorruptDataException(IProcess process, CorruptDataException e) Convert a j9ddr corrupt data exception into a DTFJ corrupt data exception- Parameters:
process
- the process from the dtfj contexte
- the j9ddr CDE- Returns:
- a DTFJ CDE
-
handleAllButMemAccExAsCorruptDataException
public static CorruptDataException handleAllButMemAccExAsCorruptDataException(IProcess p, Throwable t, Class<?>[] allowlist) throws MemoryAccessException Go through the standard handleAsCorruptDataException method to convert the supplied error condition into a corrupt data exception as long as it is not present in the allow list AND especially for this method, if it is not a MemoryAccessException. The allow list is a set of run time exceptions which must not be intercepted and must be re-thrown. Typically this is where the DTFJ API allows RTE's to be thrown as well as checked exceptions. Likewise, MemoryAccessException is an exception that must be re-thrown and not converted to CorruptDataException, hence this method's distinctive name.- Parameters:
p
- the process from the dtfj contextt
- the error condition to handleallowlist
- runtime exceptions which should be ignored and re-thrown- Returns:
- the error condition expressed as a CDE
- Throws:
MemoryAccessException
-
handleAsCorruptDataException
public static CorruptDataException handleAsCorruptDataException(IProcess p, Throwable t, Class<?>[] allowlist) Go through the standard handleAsCorruptDataException method to convert the supplied error condition into a corrupt data exception as long as it is not present in the allow list. The allow list is a set of run time exceptions which must not be intercepted and must be re-thrown. Typically this is where the DTFJ API allows RTE's to be thrown as well as checked exceptions.- Parameters:
p
- the process from the dtfj contextt
- the error condition to handleallowlist
- runtime exceptions which should be ignored and re-thrown- Returns:
- the error condition expressed as a CDE
-
handleAsCorruptDataException
Convert the supplied error condition into a corrupt data exception or re-throw it if it is an instance of Error that we do not want to intercept.- Parameters:
p
- the process from the DTFJ contextt
- error condition to convert- Returns:
- CorruptDataException
-
handleAsCorruptData
Convert the supplied error condition into a CorruptData object and return it, typically for insertion into an iterator, or re-throw it if it is an instance of Error that we do not want to intercept.- Parameters:
p
- the process from the dtfj contextt
- the error condition to handle- Returns:
- the error expressed as corrupt data
-