Create base interface DelayedFree for both DelayedFreeBucket and DelayedFreeRandomAccessThing, write a single group of DelayedFree's.
Split DelayedFreeBucket into DelayedFreeBucket (not random access) and DelayedFreeRandomAccessBucket
Doh
Use the right interface in the constructor
Add a method to convert Bucket's to RandomAccessBucket's, efficiently if possible.
Use this here. Should allow recovering from uploads from encrypted temp buckets.
Don't allow it to be freed via the DelayedFreeBucket. This is especially a concern with java auto-closing.
Imports
Locking for DelayedFree*: Avoid calling delayedFree inside lock, but lock when accessing the flags
Pass in readOnly to factory method
Move RAFBucket into src/
Fix wrong bucket type for DelayedFreeRandomAccessBucket (bug in recent code)
Pass in fg and persistentFileTracker to restoreFrom(), just like for RAFs
Persist RAFBucket's
size() should not throw.
Use Metadata.toBucket() instead of doing to bytes and immutable bucket.
Write to Bucket rather than writing to bytes first. May be slightly more disk I/O (because the bucket streams aren't buffered, but they should be), but may save a lot of memory in some cases.
Add method for length of metadata if we don't actually need to keep the bytes
Missed a RandomAccessThing in ef45e43ab57aa875d19dfa13c6fdb797a1125ba4
Use a proper Bucket for the metadata for redirects