Open infeo opened 3 months ago
The recent changes include significant modifications across several classes to enhance functionality and simplify management of file channels. Key updates involve replacing specific listener implementations with more generic Runnable
interfaces, introducing a new ChunkIO
dependency for improved chunk management, and streamlining the code by removing unnecessary parameters and data structures. These adjustments aim to boost performance and clarity while ensuring robust handling of file operations.
Files | Change Summary |
---|---|
src/main/java/org/cryptomator/cryptofs/ch/ChannelComponent.java , src/main/java/org/cryptomator/cryptofs/ch/CleartextFileChannel.java , src/test/java/org/cryptomator/cryptofs/ch/CleartextFileChannelTest.java |
Updated method signatures to replace ChannelCloseListener with Runnable , enhancing flexibility in channel closure handling. Introduced ChunkIO for better chunk management. |
src/main/java/org/cryptomator/cryptofs/fh/ChunkIO.java |
Changed visibility of ChunkIO class from package-private to public, improving accessibility across packages. |
src/main/java/org/cryptomator/cryptofs/fh/OpenCryptoFile.java , src/test/java/org/cryptomator/cryptofs/fh/OpenCryptoFileTest.java |
Removed ChunkIO dependencies from constructors, simplifying channel management. Updated tests accordingly. |
sequenceDiagram
participant Client
participant ChannelComponent
participant CleartextFileChannel
participant ChunkIO
Client->>ChannelComponent: create(ciphertextChannel, options, closeListener)
ChannelComponent->>CleartextFileChannel: new CleartextFileChannel(ciphertextChannel, chunkIO, ...)
CleartextFileChannel->>ChunkIO: registerChannel(ciphertextChannel)
Client->>CleartextFileChannel: close()
CleartextFileChannel->>ChunkIO: unregisterChannel(ciphertextChannel)
π In a world of code, so bright and keen,
New channels manage, with grace unseen.
Runnables dance, and chunks align,
Data flows smoothlyβoh, how divine!
With each little change, we hop with glee,
A brighter tomorrow for you and me! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
As already observed in other PRs, the class
OpenCryptoFile
can be simplified. This PR applies these simplifications.CleartextFileChannel
volatile int