Package net.windwards.dnsfrontend.api

Examples of net.windwards.dnsfrontend.api.BackendRepository


        cache.put(lmnt);

        ResolveTask task = new ResolveTask(query);
        task.setCache(cache);
        final LinkedList<Record> notified = new LinkedList<Record>();
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend(notified);
            }
            @Override public void stop() {}
View Full Code Here


        ResolveTask task = new ResolveTask(query);
        task.setCache(cache);
        task.setStagingZone(zone);
        final List<Record> pushed = new LinkedList<Record>();
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend(pushed);
            }
            @Override public void stop() {}
View Full Code Here

        };

        ResolveTask task = new ResolveTask(query);
        task.setCache(cache);
        task.setStagingZone(zone);
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend(new LinkedList<Record>()) {
                    @Override
                    public void notify(Record query) throws NoSuchDomainException {
View Full Code Here

        };

        ResolveTask task = new ResolveTask(query);
        task.setCache(cache);
        task.setStagingZone(zone);
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend(new LinkedList<Record>());
            }
            @Override public void stop() {}
View Full Code Here

        Message message = Message.newQuery(Record.newRecord(new Name("foo.example.com."), Type.AFSDB, DClass.IN));
        Query query = TestUtils.getQuery(replies, message);
        ResolveTask task = new ResolveTask(query);
        task.setCache(TestUtils.getEhcache());
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return null;
            }
            @Override public void stop() {}
View Full Code Here

        message.replace(host, Type.A, 3600, "1.2.3.4");

        Query query = TestUtils.getQuery(replies, message);
        ResolveTask task = new ResolveTask(query);
        task.setCache(TestUtils.getEhcache());
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return null;
            }
            @Override public void stop() {}
View Full Code Here

        };

        ResolveTask task = new ResolveTask(query);
        task.setCache(cache);
        task.setStagingZone(zone);
        task.setBackendStore(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend(new LinkedList<Record>());
            }
            @Override public void stop() {}
View Full Code Here

    @Test
    public void unknownInsertIntoCache() throws Exception {
        Ehcache cache = TestUtils.getEhcache();
        TaskKeeperImplWrapped keeper = new TaskKeeperImplWrapped(cache);
        keeper.setExpireTime(10);
        keeper.setBackendRepository(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend();
            }
            @Override public void stop() { }
View Full Code Here

    @Test
    public void replyArrivesInTime() throws Exception {
        Ehcache cache = TestUtils.getEhcache();
        TaskKeeperImplWrapped keeper = new TaskKeeperImplWrapped(cache);
        keeper.setExpireTime(10);
        keeper.setBackendRepository(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend();
            }
            @Override public void stop() { }
View Full Code Here

    @Test
    public void replyArrivesLate() throws Exception {
        Ehcache cache = TestUtils.getEhcache();
        TaskKeeperImplWrapped keeper = new TaskKeeperImplWrapped(cache);
        keeper.setExpireTime(10);
        keeper.setBackendRepository(new BackendRepository() {
            @Override
            public Backend lookup(int type) {
                return new TestingBackend();
            }
            @Override public void stop() {}
View Full Code Here

TOP

Related Classes of net.windwards.dnsfrontend.api.BackendRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.