public interface IReopenChannel<C extends Channel>
Channelfor some resource and also understand when the resource has been closed and therefore should not be reopened. This is used in combination with
FileChannelUtilityto support the transparent re-opening of a file whose channel was closed asynchronously by an interrupt in another thread during an NIO operation.
C reopenChannel() throws IOException
Channelif it is closed.
Note: This method MUST NOT be invoked if the channel was closed by an
interrupt in the caller's thread. The caller can detect
this condition by a thrown
ClosedByInterruptException rather than
AsynchronousCloseException or an
knows how to handle this.
Note: This method MUST synchronized so that concurrent operations do not
try to re-open the
Channel at the same time.
Note: While the
Channel may be open within the implementation of
this method, it IS NOT possible guaranteed that it will be open by the
time you try to use it except by synchronizing all activity on that
Channel. In general, that will limit throughput.
Note: Platforms and volumes (such as NFS) which DO NOT support
FileLock should re-open the file anyway without throwing an
exception. This behavior is required to run in those contexts.
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.