Package krati.util

Examples of krati.util.DaemonThreadFactory


     * Note that this method is called only by SimpleDataArray.
     */
    final void start() {
        _enabled = true;
        _ignoredSegs.clear();
        _executor = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
        _executor.execute(this);
    }
View Full Code Here


        // Create writer threads for populating different stores of the joiner
        StoreBusPersonWriter personWriter = new StoreBusPersonWriter("Person", eventRetention, personStore, waterMarksClock);
        StoreBusAddressWriter addressWriter = new StoreBusAddressWriter("Address", eventRetention, addressStore, waterMarksClock);
       
        // Start writer threads with fixed delay
        ScheduledExecutorService executor = Executors.newScheduledThreadPool(2, new DaemonThreadFactory());
        executor.scheduleWithFixedDelay(personWriter, 0, 10, TimeUnit.MILLISECONDS);
        executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
       
        // Start Avro store joiner bus server
        AvroStoreBus<String> storeBus = new AvroStoreBusImpl<String>("JoinedSources", eventRetention, joiner);
View Full Code Here

        // Create writer threads for populating different stores of the joiner
        StoreBusPersonWriter personWriter = new StoreBusPersonWriter("Person", eventRetention, personStore, waterMarksClock);
        StoreBusAddressWriter addressWriter = new StoreBusAddressWriter("Address", eventRetention, addressStore, waterMarksClock);
       
        // Start writer threads with fixed delay
        ScheduledExecutorService executor = Executors.newScheduledThreadPool(2, new DaemonThreadFactory());
        executor.scheduleWithFixedDelay(personWriter, 0, 10, TimeUnit.MILLISECONDS);
        executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
       
        // Start Avro store joiner bus server
        AvroStoreBus<Integer> storeBus = new AvroStoreBusImpl<Integer>("JoinedSources", eventRetention, joiner);
View Full Code Here

        // Create writer threads for populating different stores of the joiner
        PersonWriter personWriter = new PersonWriter(personStore);
        AddressWriter addressWriter = new AddressWriter(addressStore);
       
        // Start writer threads with fixed delay
        ScheduledExecutorService executor = Executors.newScheduledThreadPool(2, new DaemonThreadFactory());
        executor.scheduleWithFixedDelay(personWriter, 0, 10, TimeUnit.MILLISECONDS);
        executor.scheduleWithFixedDelay(addressWriter, 0, 10, TimeUnit.MILLISECONDS);
       
        // Start Avro store joiner server
        HttpServer server = new HttpServer(new AvroStoreResponder<String>(joiner), 8080);
View Full Code Here

        // Scan to count nextIndex
        this.initNextIndexCount();
       
        // Start to lookup nextIndex
        this._nextIndexLookup.setEnabled(true);
        this._nextIndexExecutor = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
        this._nextIndexExecutor.execute(_nextIndexLookup);
       
        // Grow 20% upon auto expansion
        this.setExpandRate(0.2f);
       
View Full Code Here

            // Scan to count nextIndex
            initNextIndexCount();
           
            // Start nextIndex lookup executor
            _nextIndexLookup.setEnabled(true);
            _nextIndexExecutor = Executors.newSingleThreadExecutor(new DaemonThreadFactory());
            _nextIndexExecutor.execute(_nextIndexLookup);
           
            _mode = Mode.OPEN;
        } catch(Exception e) {
            _mode = Mode.CLOSED;
View Full Code Here

TOP

Related Classes of krati.util.DaemonThreadFactory

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.