Package org.eclipse.aether.internal.impl
Class TrackingFileManager
- java.lang.Object
-
- org.eclipse.aether.internal.impl.TrackingFileManager
-
class TrackingFileManager extends java.lang.Object
Manages potentially concurrent accesses to a properties file.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description TrackingFileManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
close(java.io.Closeable closeable, java.io.File file)
private java.lang.Object
getLock(java.io.File file)
private java.nio.channels.FileLock
lock(java.nio.channels.FileChannel channel, long size, boolean shared)
java.util.Properties
read(java.io.File file)
private void
release(java.nio.channels.FileLock lock, java.io.File file)
java.util.Properties
update(java.io.File file, java.util.Map<java.lang.String,java.lang.String> updates)
-
-
-
Method Detail
-
read
public java.util.Properties read(java.io.File file)
-
update
public java.util.Properties update(java.io.File file, java.util.Map<java.lang.String,java.lang.String> updates)
-
release
private void release(java.nio.channels.FileLock lock, java.io.File file)
-
close
private void close(java.io.Closeable closeable, java.io.File file)
-
getLock
private java.lang.Object getLock(java.io.File file)
-
lock
private java.nio.channels.FileLock lock(java.nio.channels.FileChannel channel, long size, boolean shared) throws java.io.IOException
- Throws:
java.io.IOException
-
-