Package net.floodlightcontroller.counter

Examples of net.floodlightcontroller.counter.ICounter


     * Then convert the rate to an absolute number for the
     * FLOW_RECONCILE_PERIOD.
     * @return
     */
    protected int getCurrentCapacity() {
        ICounter pktInCounter =
            counterStore.getCounter(controllerPktInCounterName);
        int minFlows = MIN_FLOW_RECONCILE_PER_SECOND *
                        FLOW_RECONCILE_DELAY_MILLISEC / 1000;

        // If no packetInCounter, then there shouldn't be any flow.
        if (pktInCounter == null ||
            pktInCounter.getCounterDate() == null ||
            pktInCounter.getCounterValue() == null) {
            logger.debug("counter {} doesn't exist",
                        controllerPktInCounterName);
            return minFlows;
        }

View Full Code Here


                switchID + ICounterStoreService.TitleDelimitor + counterName;
        } catch (UnsupportedEncodingException e) {
            //Just leave counterTitle undecoded if there is an issue - fail silently
        }

        ICounter counter = this.counterStore.getCounter(fullCounterName);
        Map<String, Long> sample = new HashMap<String, Long> ();
        if (counter != null) {
            sample.put(counter.getCounterDate().toString(),
                       counter.getCounterValue().getLong());
            model.put(switchID, sample);
        }
    }
View Full Code Here

                        model.put(counterName, v.getDouble());
                    }  
                }  
            }  
        } else {
            ICounter counter = this.counterStore.getCounter(counterTitle);
            if (counter != null) {
                v = counter.getCounterValue();
            } else {
                v = new CounterValue(CounterValue.CounterType.LONG);
            }  

            if (CounterValue.CounterType.LONG == v.getType()) {
View Full Code Here

                updateCounters(baseName, null);
                counterName = baseName + CounterStore.TitleDelimitor + tableName;
            } else {
                counterName = baseName;
            }
            ICounter counter = counterStore.getCounter(counterName);
            if (counter == null) {
                counter = counterStore.createCounter(counterName, CounterType.LONG);
            }
            counter.increment();
        }
    }
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.counter.ICounter

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.