Package org.eclipse.aether.internal.impl
Class NamedLocksTrackingFileManager
- java.lang.Object
-
- org.eclipse.aether.internal.impl.NamedLocksTrackingFileManager
-
- All Implemented Interfaces:
TrackingFileManager
public final class NamedLocksTrackingFileManager extends java.lang.Object implements TrackingFileManager
Manages access to a properties file using named locks.This implementation uses
NamedLockto protect tracking files from concurrent access, and can be used when it is single "modern" Maven version used to access same local repository concurrently.- Since:
- 2.0.17
- See Also:
LegacyTrackingFileManager,TrackingFileManagerSupplier
-
-
Constructor Summary
Constructors Constructor Description NamedLocksTrackingFileManager(org.eclipse.aether.named.NamedLockFactory namedLockFactory, long time, java.util.concurrent.TimeUnit unit)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleandelete(java.io.File file)Deprecated.booleandelete(java.nio.file.Path path)Deletes the specified properties file, if exists.java.util.Propertiesread(java.io.File file)Deprecated.java.util.Propertiesread(java.nio.file.Path path)Reads up the specified properties file intoProperties, if exists, otherwisenullis returned.java.util.Propertiesupdate(java.io.File file, java.util.Map<java.lang.String,java.lang.String> updates)Deprecated.java.util.Propertiesupdate(java.nio.file.Path path, java.util.Map<java.lang.String,java.lang.String> updates)Applies updates to specified properties file and returns resultingPropertieswith contents same as in updated file, nevernull.
-
-
-
Constructor Detail
-
NamedLocksTrackingFileManager
public NamedLocksTrackingFileManager(org.eclipse.aether.named.NamedLockFactory namedLockFactory, long time, java.util.concurrent.TimeUnit unit)
-
-
Method Detail
-
read
@Deprecated public java.util.Properties read(java.io.File file)
Deprecated.Description copied from interface:TrackingFileManagerReads up the specified properties file intoProperties, if exists, otherwisenullis returned.- Specified by:
readin interfaceTrackingFileManager
-
read
public java.util.Properties read(java.nio.file.Path path)
Description copied from interface:TrackingFileManagerReads up the specified properties file intoProperties, if exists, otherwisenullis returned.- Specified by:
readin interfaceTrackingFileManager
-
update
@Deprecated public java.util.Properties update(java.io.File file, java.util.Map<java.lang.String,java.lang.String> updates)
Deprecated.Description copied from interface:TrackingFileManagerApplies updates to specified properties file and returns resultingPropertieswith contents same as in updated file, nevernull.- Specified by:
updatein interfaceTrackingFileManager
-
update
public java.util.Properties update(java.nio.file.Path path, java.util.Map<java.lang.String,java.lang.String> updates)
Description copied from interface:TrackingFileManagerApplies updates to specified properties file and returns resultingPropertieswith contents same as in updated file, nevernull.- Specified by:
updatein interfaceTrackingFileManager
-
delete
@Deprecated public boolean delete(java.io.File file)
Deprecated.Description copied from interface:TrackingFileManagerDeletes the specified properties file, if exists. If file existed and was deleted, returnstrue.- Specified by:
deletein interfaceTrackingFileManager
-
delete
public boolean delete(java.nio.file.Path path)
Description copied from interface:TrackingFileManagerDeletes the specified properties file, if exists. If file existed and was deleted, returnstrue.- Specified by:
deletein interfaceTrackingFileManager
-
-