package org.josast.influxdb;

import java.util.Date;

public class EntrySatDB {
	
	static Entrysat app =null;
	
	/** Constructeur priv� */  
    private EntrySatDB()
    {
    	app = new Entrysat();
        app.conect("http://127.0.0.1:8086", "test", "test");
        app.createDataBase("EntrySat");
    }
     
    /** Holder */
    private static class SingletonHolder
    {       
        /** Instance unique non pr�initialis�e */
        private final static EntrySatDB instance = new EntrySatDB();
    }
 
    /** Point d'acc�s pour l'instance unique du singleton */
    public static EntrySatDB getInstance()
    {
        return SingletonHolder.instance;
    }

    public  void addEntrySatData(String source, String data)
    {
    	app.addEntrySatData(source,data);
    }
    
    public  void addEntrySatData(String source, String data,Date time)
    {
    	app.addEntrySatData(source,data,time);
    }  
}
