Package io.jenkins.plugins.redis
Class RedisFingerprintStorage
java.lang.Object
hudson.model.AbstractDescribableImpl<FingerprintStorage>
jenkins.fingerprints.FingerprintStorage
io.jenkins.plugins.redis.RedisFingerprintStorage
- All Implemented Interfaces:
ExtensionPoint
,Describable<FingerprintStorage>
@Extension public class RedisFingerprintStorage extends FingerprintStorage
Pluggable external fingerprint storage for fingerprints in Redis.
- Author:
- Sumit Sarin
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RedisFingerprintStorage.DescriptorImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
Constructors Constructor Description RedisFingerprintStorage()
-
Method Summary
Modifier and Type Method Description void
delete(String id)
Deletes the fingerprint with the given id.static RedisFingerprintStorage
get()
int
getConnectionTimeout()
String
getCredentialsId()
int
getDatabase()
String
getHost()
String
getPassword()
int
getPort()
int
getSocketTimeout()
boolean
getSsl()
String
getUsername()
boolean
isReady()
Returns true if there's some data in the fingerprint database.void
iterateAndCleanupFingerprints(TaskListener listener)
Fingerprint
load(String id)
Returns the fingerprint associated with the given unique id and the Jenkins instance ID, from the storage.void
save(Fingerprint fp)
Saves the given fingerprint.void
setConnectionTimeout(int connectionTimeout)
void
setCredentialsId(String credentialsId)
void
setDatabase(int database)
void
setHost(String host)
void
setPort(int port)
void
setSocketTimeout(int socketTimeout)
void
setSsl(boolean ssl)
Methods inherited from class jenkins.fingerprints.FingerprintStorage
cleanFingerprint, getDescriptor, getFileFingerprintStorage, getFingerprint
-
Constructor Details
-
RedisFingerprintStorage
- Throws:
IOException
-
-
Method Details
-
get
-
save
Saves the given fingerprint.- Specified by:
save
in classFingerprintStorage
- Throws:
redis.clients.jedis.exceptions.JedisException
-
load
@CheckForNull public Fingerprint load(@NonNull String id) throws IOException, redis.clients.jedis.exceptions.JedisExceptionReturns the fingerprint associated with the given unique id and the Jenkins instance ID, from the storage.- Specified by:
load
in classFingerprintStorage
- Throws:
IOException
redis.clients.jedis.exceptions.JedisException
-
delete
Deletes the fingerprint with the given id.- Specified by:
delete
in classFingerprintStorage
- Throws:
redis.clients.jedis.exceptions.JedisException
-
isReady
public boolean isReady()Returns true if there's some data in the fingerprint database.- Specified by:
isReady
in classFingerprintStorage
-
iterateAndCleanupFingerprints
- Specified by:
iterateAndCleanupFingerprints
in classFingerprintStorage
-
getHost
-
setHost
-
getPort
public int getPort() -
setPort
@DataBoundSetter public void setPort(int port) -
getDatabase
public int getDatabase() -
setDatabase
@DataBoundSetter public void setDatabase(int database) -
getSsl
public boolean getSsl() -
setSsl
@DataBoundSetter public void setSsl(boolean ssl) -
getConnectionTimeout
public int getConnectionTimeout() -
setConnectionTimeout
@DataBoundSetter public void setConnectionTimeout(int connectionTimeout) -
getSocketTimeout
public int getSocketTimeout() -
setSocketTimeout
@DataBoundSetter public void setSocketTimeout(int socketTimeout) -
getCredentialsId
-
setCredentialsId
-
getUsername
-
getPassword
-