git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@129568 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
be994ed95b
commit
91a5081087
2
pom.xml
2
pom.xml
|
@ -9,7 +9,7 @@
|
|||
|
||||
<groupId>org.gcube.data.publishing</groupId>
|
||||
<artifactId>document-store-lib</artifactId>
|
||||
<version>1.1.2-SNAPSHOT</version>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<name>Document Store Lib</name>
|
||||
<description>Allow to persist data in NoSQL Document Store Databases.
|
||||
Discover Model dynamically.
|
||||
|
|
|
@ -53,7 +53,7 @@ public abstract class AggregationScheduler implements Runnable {
|
|||
* The Max amount of time for reload a configuration
|
||||
* TODO Get from configuration
|
||||
*/
|
||||
public static long TIME_RELOAD_CONFIGURATION =1000*60*60*1; // 5 hour
|
||||
public static long TIME_RELOAD_CONFIGURATION =1000*60*60*12; // 5 hour
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package org.gcube.documentstore.records.implementation;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ConfigurationGetPropertyValues {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ConfigurationGetPropertyValues.class);
|
||||
|
||||
public Properties getPropValues() throws IOException {
|
||||
Properties prop = null;
|
||||
String propFileName = "./config/accounting.properties";
|
||||
logger.trace("property file search"+propFileName);
|
||||
try (FileInputStream inputStream= new FileInputStream(propFileName)){
|
||||
if (inputStream != null) {
|
||||
prop=new Properties();
|
||||
prop.load(inputStream);
|
||||
} else
|
||||
logger.trace("property file not Found"+propFileName);
|
||||
}catch (Exception e) {
|
||||
logger.trace("property file error on input stream"+e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
return prop;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue