Package jenkins.fingerprints
Class FileFingerprintStorage
java.lang.Object
hudson.model.AbstractDescribableImpl<FingerprintStorage>
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 classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes the Fingerprint with the given unique ID.protected Fingerprint
protected File
boolean
isReady()
Returns true if there's some data in the local fingerprint database.void
iterateAndCleanupFingerprints
(TaskListener taskListener) Perform Fingerprint cleanup.static Fingerprint
Load the Fingerprint stored inside the given file.Load the Fingerprint with the given unique id.protected Fingerprint
loadFingerprint
(File fingerprintFile) void
save
(Fingerprint fp) Saves the given Fingerprint in local XML-based database.static void
save
(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:
load
in 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:
save
in 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:
delete
in classFingerprintStorage
- Throws:
IOException
- Deletion error
-
isReady
public boolean isReady()Returns true if there's some data in the local fingerprint database.- Specified by:
isReady
in classFingerprintStorage
-
iterateAndCleanupFingerprints
Perform Fingerprint cleanup.- Specified by:
iterateAndCleanupFingerprints
in classFingerprintStorage
-
loadFingerprint
- Throws:
IOException
-
getFingerprint
- Overrides:
getFingerprint
in classFingerprintStorage
- Throws:
IOException
-
getRootDir
-