Package org.apache.lucene.gdata.utils

Examples of org.apache.lucene.gdata.utils.MultiThreadEntryStub


        // ############ test concurrency

        // ############ test concurrency
        Object monitor = new Object();
        AtomicBoolean reached = new AtomicBoolean(false);
        MultiThreadEntryStub concuEntry = new MultiThreadEntryStub();
        concuEntry.setId(System.currentTimeMillis() + "");
        ProvidedServiceConfig conf = new ProvidedServiceConfig();
        conf.setName(SERVICENAME);
        concuEntry.setServiceConfig(conf);
        concuEntry.setUpdated(DateTime.now());
        concuEntry.setFeedId(FEEDID);

        storage = this.controller.getStorage();

        storage.storeEntry(concuEntry);
        storage.close();
        concuEntry.acceptGetVersionVisitor(getMonitorVisitor(monitor, reached));

        Thread t1 = getDelThread(controller, concuEntry, false);

        Thread t2 = getDelThread(controller, concuEntry, true);
        t1.start();
View Full Code Here


        // ############ test concurrency
        Object monitor = new Object();
        AtomicBoolean reached = new AtomicBoolean(false);

        MultiThreadEntryStub concuEntry = new MultiThreadEntryStub();
        concuEntry.setId(System.currentTimeMillis() + "");
        ProvidedServiceConfig conf = new ProvidedServiceConfig();
        conf.setName(SERVICENAME);
        concuEntry.setServiceConfig(conf);
        concuEntry.setUpdated(DateTime.now());
        concuEntry.setFeedId(FEEDID);

        storage = this.controller.getStorage();

        storage.storeEntry(concuEntry);
        storage.close();
        concuEntry.acceptGetEntryVisitor(getMonitorVisitor(monitor, reached));

        Thread t1 = getUpdThread(controller, concuEntry, false);

        Thread t2 = getUpdThread(controller, concuEntry, true);
        t1.start();
View Full Code Here

       
       
        Object monitor = new Object();
        AtomicBoolean reached = new AtomicBoolean(false);

        MultiThreadEntryStub concuEntry = new MultiThreadEntryStub();
        concuEntry.setId(System.currentTimeMillis() + "");
        ProvidedService conf = new ProvidedServiceStub();
       
        concuEntry.setServiceConfig(conf);
        concuEntry.setUpdated(DateTime.now());
        concuEntry.setFeedId("feed");
        this.storage.storeEntry(concuEntry);
        storage.close();
        concuEntry.acceptGetVersionVisitor(getMonitorVisitor(monitor,reached));


        Thread t1 = getDelThread(storage, concuEntry, false);

        Thread t2 = getDelThread(storage, concuEntry, true);
View Full Code Here

     */
    public void testUpdateEntry() throws InterruptedException {
        Object monitor = new Object();
        AtomicBoolean reached = new AtomicBoolean(false);

        MultiThreadEntryStub concuEntry = new MultiThreadEntryStub();
        concuEntry.setId(System.currentTimeMillis() + "");
        ProvidedService conf = new ProvidedServiceStub();
       
        concuEntry.setServiceConfig(conf);
        concuEntry.setUpdated(DateTime.now());
        concuEntry.setFeedId("feed");
        this.storage.storeEntry(concuEntry);
        storage.close();
        concuEntry.acceptGetEntryVisitor(getMonitorVisitor(monitor,reached));


        Thread t1 = getUpdThread(storage, concuEntry, false);

        Thread t2 = getUpdThread(storage, concuEntry, true);
View Full Code Here

TOP

Related Classes of org.apache.lucene.gdata.utils.MultiThreadEntryStub

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.