3. How do I take advantage of error-recovery features of paths?
Two new IO exceptions have been added to the paths package: InterruptedPathException and NoPathFoundException. If the path breaks and the system is able to rebuild the path, then an InterruptedPathException is thrown, letting the sender know that the path was rebuilt but that some data injected into the path might have been lost. Thus, the sender will be able to resend the data if needed. If the path breaks and the system is not able to rebuild the path, then a NoPathFoundException is thrown, letting the sender know that the path could not be rebuilt. In this case, the sender might choose to retry rebuilding the path at a later time, specify a completely new logical path or take the appropriate action (such as sending an error message to the application layer above).
When a path breaks down, the entire path is teared down and
reinstantiated/reimplemented it. If successful, then recovery
is done. If unsuccessful, a new logical path is searched
for using APC. The new path is reinstantiated/reimplemented.
This is a recursive process (that goes back and forth in case
of failure) between APC, instiator and implementer. If no
new logical path can be found, then the system gives up by throwing
a NoPathFoundException. If the path is rebuilt (either old
logical path or new logical path), then the system throws an InterruptedPathException.
Back to [Paths]