Example usage for org.apache.commons.configuration SubnodeConfiguration getLong

List of usage examples for org.apache.commons.configuration SubnodeConfiguration getLong

Introduction

In this page you can find the example usage for org.apache.commons.configuration SubnodeConfiguration getLong.

Prototype

public long getLong(String key, long defaultValue) 

Source Link

Usage

From source file:org.midonet.config.providers.HierarchicalConfigurationProvider.java

@Override
public long getValue(String group, String key, long defaultValue) {
    try {//from  w ww  .  j  a  v a 2  s  .c  om
        SubnodeConfiguration subConfig = config.configurationAt(group);
        return subConfig.getLong(key, defaultValue);
    } catch (Throwable ex) {
        // fail properly if the configuration is missing this group
        return defaultValue;
    }
}