public class WindowsMMapHack extends Object
This class knows how to force an mmap'd ByteBuffer to reliquish its file handles before it becomes garbage collected, by exploiting implementation details of the HotSpot JVM implementation.
This is required on Windows because otherwise an attempt to delete a file that is still mmapped will fail. This can happen when a user requests a "restore from seed" function, which involves deleting and recreating the chain file. At some point we should stop using mmap in SPVBlockStore and we can then delete this class.
It is a separate class to avoid hitting unknown imports when running on other JVMs.
|Constructor and Description|
public static void forceRelease(MappedByteBuffer buffer)
Copyright © 2018. All rights reserved.