当前位置: 首页>>代码示例>>Java>>正文


Java SystemClockTimestamp类代码示例

本文整理汇总了Java中org.onosproject.store.trivial.SystemClockTimestamp的典型用法代码示例。如果您正苦于以下问题:Java SystemClockTimestamp类的具体用法?Java SystemClockTimestamp怎么用?Java SystemClockTimestamp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SystemClockTimestamp类属于org.onosproject.store.trivial包,在下文中一共展示了SystemClockTimestamp类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: corruptPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in CORRUPT during periodic poll.
 */
@Test
public void corruptPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(CORRUPT);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {}
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    cleanup.run(); //FIXME broken?
    assertEquals("Expect number of submits incorrect",
                 1, service.submitCounter());
}
 
开发者ID:shlee89,项目名称:athena,代码行数:27,代码来源:IntentCleanupTest.java

示例2: pendingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALL_REQ for too long.
 */
@Test
public void pendingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {}

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    cleanup.run();
    assertEquals("Expect number of submits incorrect",
                 1, service.submitCounter());

}
 
开发者ID:shlee89,项目名称:athena,代码行数:27,代码来源:IntentCleanupTest.java

示例3: pendingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALL_REQ for too long.
 */
@Test
public void pendingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {}

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    cleanup.run();
    assertEquals("Expect number of submits incorrect",
                 1, service.pendingCounter());

}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:27,代码来源:IntentCleanupTest.java

示例4: installingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALLING for too long.
 */
@Test
public void installingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(INSTALLING);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    cleanup.run();
    assertEquals("Expect number of submits incorrect",
                 1, service.submitCounter());

}
 
开发者ID:shlee89,项目名称:athena,代码行数:30,代码来源:IntentCleanupTest.java

示例5: corruptPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in CORRUPT during periodic poll.
 */
@Test
public void corruptPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(CORRUPT);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {}
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    service.submit(intent);
    expectLastCall().once();
    replay(service);

    cleanup.run(); //FIXME broken?
    verify(service);
    reset(service);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:31,代码来源:IntentCleanupTestMock.java

示例6: pendingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALL_REQ for too long.
 */
@Test
public void pendingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {}

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    service.submit(intent);
    expectLastCall().once();
    replay(service);

    cleanup.run();
    verify(service);
    reset(service);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:30,代码来源:IntentCleanupTestMock.java

示例7: installingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALLING for too long.
 */
@Test
public void installingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(INSTALLING);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    service.submit(intent);
    expectLastCall().once();
    replay(service);

    cleanup.run();
    verify(service);
    reset(service);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:33,代码来源:IntentCleanupTestMock.java

示例8: installingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALLING for too long.
 */
@Test
@Ignore("The implementation is dependent on the SimpleStore")
public void installingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(INSTALLING);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    cleanup.run();
    assertEquals("Expect number of submits incorrect",
                 1, service.pendingCounter());

}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:31,代码来源:IntentCleanupTest.java

示例9: corruptPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in CORRUPT during periodic poll.
 */
@Test
public void corruptPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(CORRUPT);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {}
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    service.submit(intent);
    expectLastCall().once();
    replay(service);

    cleanup.run();

    verify(service);
    reset(service);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:32,代码来源:IntentCleanupTestMock.java

示例10: pendingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALL_REQ for too long.
 */
@Test
public void pendingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {}

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    service.addPending(data);
    expectLastCall().once();
    replay(service);

    cleanup.run();
    verify(service);
    reset(service);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:30,代码来源:IntentCleanupTestMock.java

示例11: installingPoll

import org.onosproject.store.trivial.SystemClockTimestamp; //导入依赖的package包/类
/**
 * Trigger resubmit of intent in INSTALLING for too long.
 */
@Test
@Ignore("The implementation is dependent on the SimpleStore")
public void installingPoll() {
    IntentStoreDelegate mockDelegate = new IntentStoreDelegate() {
        @Override
        public void process(IntentData intentData) {
            intentData.setState(INSTALLING);
            store.write(intentData);
        }

        @Override
        public void notify(IntentEvent event) {
            cleanup.event(event);
        }
    };
    store.setDelegate(mockDelegate);

    Intent intent = new MockIntent(1L);
    Timestamp version = new SystemClockTimestamp(1L);
    IntentData data = new IntentData(intent, INSTALL_REQ, version);
    store.addPending(data);

    service.addPending(data);
    expectLastCall().once();
    replay(service);

    cleanup.run();
    verify(service);
    reset(service);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:34,代码来源:IntentCleanupTestMock.java


注:本文中的org.onosproject.store.trivial.SystemClockTimestamp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。