public class CertificateCacheV2 extends Object
| Constructor and Description |
|---|
CertificateCacheV2()
Create a CertificateCacheV2.
|
CertificateCacheV2(double maxLifetimeMilliseconds)
Create a CertificateCacheV2.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all certificates from the cache.
|
void |
deleteCertificate(Name certificateName)
Remove the certificate whose name equals the given name.
|
CertificateV2 |
find(Interest interest)
Find the certificate by the given interest.
|
CertificateV2 |
find(Name certificatePrefix)
Find the certificate by the given key name.
|
static double |
getDefaultLifetime()
Get the default maximum lifetime (1 hour).
|
void |
insert(CertificateV2 certificate)
Insert the certificate into the cache.
|
void |
setNowOffsetMilliseconds_(double nowOffsetMilliseconds)
Set the offset when insert() and refresh() get the current time, which
should only be used for testing.
|
public CertificateCacheV2(double maxLifetimeMilliseconds)
maxLifetimeMilliseconds - The maximum time that certificates can live
inside the cache, in milliseconds.public CertificateCacheV2()
public final void insert(CertificateV2 certificate) throws CertificateV2.Error
certificate - The certificate object, which is copied.CertificateV2.Errorpublic final CertificateV2 find(Name certificatePrefix)
certificatePrefix - The certificate prefix for searching for the
certificate.public final CertificateV2 find(Interest interest)
interest - The input interest object.public final void deleteCertificate(Name certificateName)
certificateName - The name of the certificate.public final void clear()
public static double getDefaultLifetime()
public final void setNowOffsetMilliseconds_(double nowOffsetMilliseconds)
nowOffsetMilliseconds - The offset in milliseconds.Copyright © 2019. All rights reserved.