Package org.rioproject.watch

Examples of org.rioproject.watch.Calculable


    private class ReplicatorTask implements Runnable {
        public void run() {
            while(!closed) {
                try {
                    Calculable calculable = replicatorQ.poll(5, TimeUnit.SECONDS);
                    if(calculable!=null) {
                        replicate(calculable);
                    }
                } catch(IOException e) {
                    logger.warn("Replication communication failure: ", e);
View Full Code Here


                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
                try {
                    Calculable c = checkAdd(s, "temperature", lastTemperature);
                    if(c!=null) {
                        lastTemperature = c;
                        temperatureTimeSeries.addOrUpdate(new FixedMillisecond(c.getWhen()), c.getValue());
                    }
                } catch (RemoteException e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

            super(id);
            super.setPeriod(1000);
        }

        public void checkValue() {
            super.addWatchRecord(new Calculable("taux", numberOfCalls / (getPeriod() / 1000)));
            numberOfCalls = 0;
        }
View Full Code Here

TOP

Related Classes of org.rioproject.watch.Calculable

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.