Class RevocationCache<Data>
java.lang.Object
br.ufsc.labsec.utils.cache.Cache<RevocationResult<Data>>
br.ufsc.labsec.signature.repository.PKCS12IdentityService.RevocationCache<Data>
- All Implemented Interfaces:
Iterable<CacheEntry<RevocationResult<Data>>>
- Direct Known Subclasses:
CRLCacheManagement,OCSPCacheManagement
public abstract class RevocationCache<Data> extends Cache<RevocationResult<Data>>
-
Nested Class Summary
Nested classes/interfaces inherited from class br.ufsc.labsec.utils.cache.Cache
Cache.Source -
Field Summary
Fields inherited from class br.ufsc.labsec.utils.cache.Cache
path, regexFilter, runtimeCache -
Constructor Summary
Constructors Constructor Description RevocationCache(String path, String regexFilter, String fileTemplate) -
Method Summary
Modifier and Type Method Description protected abstract Optional<RevocationResult<Data>>download(SubjectIssuerPair certificatePair)protected Optional<RevocationResult<Data>>downloadAndStore(SubjectIssuerPair certificatePair)protected StringgetCacheKeyFromCert(Object cert)Retorna a chave do cache a partir de um certificadoprotected Optional<RevocationResult<Data>>getRevocation(SubjectIssuerPair certificatePair, Date timeReference)protected booleanisUseful(RevocationResult<Data> data, Date timeReference)Verifica se o objeto armazenado no cache é útil para ser armazenadoprotected abstract booleanisUseful(Data data, Date timeReference)Verifica se o objeto armazenado no cache é útil pare ser armazenadoMethods inherited from class br.ufsc.labsec.utils.cache.Cache
checkExpired, decodeEntry, get, getLastAccess, getSource, groupFilesInDiskBy, has, has, iterator, remove, storeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RevocationCache
-
-
Method Details
-
getRevocation
protected Optional<RevocationResult<Data>> getRevocation(SubjectIssuerPair certificatePair, Date timeReference) -
getCacheKeyFromCert
Retorna a chave do cache a partir de um certificado- Parameters:
cert- O certificado- Returns:
- A chave do cache
-
isUseful
Verifica se o objeto armazenado no cache é útil pare ser armazenado- Parameters:
data- O objetotimeReference- A data de referência- Returns:
- Indica se o objeto é útil
-
isUseful
Verifica se o objeto armazenado no cache é útil para ser armazenado- Parameters:
data- O wrapper do objetotimeReference- A data de referência- Returns:
- Indica se o objeto é útil
-
download
-
downloadAndStore
-