Open dkocher opened 8 years ago
As client can merge multiple opens into a single one you must bind your close action to open-state-id, which on dispose will call-back your onClose action.. By saying that I am pretty sure nfs4j does not provides a way to create such a binding. One possibility will be to extend CLOSE and OPEN operations and add required functionality. For example:
As you have a valid use-case, I am fine to add a functionality which will make tracking of open+close operation simple. Can you provide a little bit more context?
The context is as follows (sorry for asking for a solution instead of describing the problem): The implementation of the virtual filesystem handles a persistent connection for open files with java.io.*
with an open output or input stream while a write or read operation is in progress. Therefore it is crucial to close the underlying stream once a CLOSE
operation is received to flush the changes. We are looking to replace our current NFSv3 implementation in Mountain Duck with nfs4j.
I am missing a notification in the virtual filesystem for
CLOSE
operations. Would be nice if theVirtualFileSystem
can be extended with aclose
operation that is called fromorg.dcache.nfs.v4.OperationCLOSE
.