Package jenkins.fingerprints
Class FileFingerprintStorage
java.lang.Object
jenkins.fingerprints.FingerprintStorage
jenkins.fingerprints.FileFingerprintStorage
- All Implemented Interfaces:
ExtensionPoint,Describable<FingerprintStorage>
@Symbol("fileFingerprintStorage")
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension(ordinal=-100.0)
public class FileFingerprintStorage
extends FingerprintStorage
Default file system storage implementation for fingerprints.
- Author:
- Sumit Sarin
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes the Fingerprint with the given unique ID.protected Fingerprintprotected FilebooleanisReady()Returns true if there's some data in the local fingerprint database.voiditerateAndCleanupFingerprints(TaskListener taskListener) Perform Fingerprint cleanup.static FingerprintLoad the Fingerprint stored inside the given file.Load the Fingerprint with the given unique id.protected FingerprintloadFingerprint(File fingerprintFile) voidsave(Fingerprint fp) Saves the given Fingerprint in local XML-based database.static voidsave(Fingerprint fp, File file) Saves the given Fingerprint as XML inside file.Methods inherited from class jenkins.fingerprints.FingerprintStorage
cleanFingerprint, get, getDescriptor, getFileFingerprintStorage
-
Field Details
-
FINGERPRINTS_DIR_NAME
- See Also:
-
-
Constructor Details
-
FileFingerprintStorage
@DataBoundConstructor public FileFingerprintStorage()
-
-
Method Details
-
load
Load the Fingerprint with the given unique id.- Specified by:
loadin classFingerprintStorage- Throws:
IOException- Load error
-
load
Load the Fingerprint stored inside the given file.- Throws:
IOException
-
save
Saves the given Fingerprint in local XML-based database.- Specified by:
savein classFingerprintStorage- Parameters:
fp- Fingerprint file to be saved.- Throws:
IOException- Save error
-
save
Saves the given Fingerprint as XML inside file.- Throws:
IOException
-
delete
Deletes the Fingerprint with the given unique ID.- Specified by:
deletein classFingerprintStorage- Throws:
IOException- Deletion error
-
isReady
public boolean isReady()Returns true if there's some data in the local fingerprint database.- Specified by:
isReadyin classFingerprintStorage
-
iterateAndCleanupFingerprints
Perform Fingerprint cleanup.- Specified by:
iterateAndCleanupFingerprintsin classFingerprintStorage
-
loadFingerprint
- Throws:
IOException
-
getFingerprint
- Overrides:
getFingerprintin classFingerprintStorage- Throws:
IOException
-
getRootDir
-