Examples of BackendRepository


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

Examples of net.windwards.dnsfrontend.api.BackendRepository

        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

Examples of net.windwards.dnsfrontend.api.BackendRepository

        };

        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

Examples of net.windwards.dnsfrontend.api.BackendRepository

        };

        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

Examples of net.windwards.dnsfrontend.api.BackendRepository

        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

Examples of net.windwards.dnsfrontend.api.BackendRepository

        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

Examples of net.windwards.dnsfrontend.api.BackendRepository

        };

        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

Examples of net.windwards.dnsfrontend.api.BackendRepository

    @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

Examples of net.windwards.dnsfrontend.api.BackendRepository

    @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

Examples of net.windwards.dnsfrontend.api.BackendRepository

    @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
Copyright © 2018 www.massapi.com. 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.