Search in sources :

Example 1 with ExtendedLRUCache

use of org.minidns.cache.ExtendedLRUCache in project minidns by MiniDNS.

the class DNSSECStats method iterativeDnsssecTest.

public static void iterativeDnsssecTest() throws SecurityException, IllegalArgumentException, IOException {
    MiniDnsJul.enableMiniDnsTrace();
    DNSSECClient client = new DNSSECClient(new ExtendedLRUCache());
    client.setMode(Mode.iterativeOnly);
    DNSSECMessage secRes = client.queryDnssec("verteiltesysteme.net", TYPE.A);
    // CHECKSTYLE:OFF
    System.out.println(secRes);
// CHECKSTYLE:ON
}
Also used : ExtendedLRUCache(org.minidns.cache.ExtendedLRUCache) DNSSECMessage(org.minidns.dnssec.DNSSECMessage) DNSSECClient(org.minidns.dnssec.DNSSECClient)

Example 2 with ExtendedLRUCache

use of org.minidns.cache.ExtendedLRUCache in project minidns by MiniDNS.

the class IntegrationTestTools method getClient.

public static DNSSECClient getClient(CacheConfig cacheConfig) {
    DNSCache cache;
    switch(cacheConfig) {
        case without:
            cache = null;
            break;
        case normal:
            cache = new LRUCache();
            break;
        case extended:
            cache = new ExtendedLRUCache();
            break;
        case full:
            cache = new FullLRUCache();
            break;
        default:
            throw new IllegalStateException();
    }
    DNSSECClient client = new DNSSECClient(cache);
    client.setDataSource(new NetworkDataSourceWithAccounting());
    return client;
}
Also used : ExtendedLRUCache(org.minidns.cache.ExtendedLRUCache) FullLRUCache(org.minidns.cache.FullLRUCache) ExtendedLRUCache(org.minidns.cache.ExtendedLRUCache) LRUCache(org.minidns.cache.LRUCache) FullLRUCache(org.minidns.cache.FullLRUCache) DNSSECClient(org.minidns.dnssec.DNSSECClient) DNSCache(org.minidns.DNSCache) NetworkDataSourceWithAccounting(org.minidns.source.NetworkDataSourceWithAccounting)

Aggregations

ExtendedLRUCache (org.minidns.cache.ExtendedLRUCache)2 DNSSECClient (org.minidns.dnssec.DNSSECClient)2 DNSCache (org.minidns.DNSCache)1 FullLRUCache (org.minidns.cache.FullLRUCache)1 LRUCache (org.minidns.cache.LRUCache)1 DNSSECMessage (org.minidns.dnssec.DNSSECMessage)1 NetworkDataSourceWithAccounting (org.minidns.source.NetworkDataSourceWithAccounting)1