All Downloads are FREE. Search and download functionalities are using the official Maven repository.

decodes.tsdb.test.ListLocks Maven / Gradle / Ivy

Go to download

A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.

The newest version!
package decodes.tsdb.test;

import java.util.List;

import lrgs.gui.DecodesInterface;
import opendcs.dai.LoadingAppDAI;
import decodes.tsdb.*;
import decodes.util.CmdLineArgs;
import decodes.util.DecodesException;

public class ListLocks 
	extends TsdbAppTemplate
{
	public static final String module = "ListLocks";
	
	public ListLocks()
	{
		super("util.log");
		appNameArg.setDefaultValue("utility");
	}

	@Override
	protected void runApp()
		throws Exception
	{
		LoadingAppDAI loadingAppDao = decodes.db.Database.getDb().getDbIo().makeLoadingAppDAO();
		List locks = loadingAppDao.getAllCompProcLocks();
		System.out.println("" + locks.size() + " Locks Retrieved:");

		for(TsdbCompLock lock : locks)
			System.out.println(lock.toString());
		loadingAppDao.close();
	}

	public static void main(String args[])
		throws Exception
	{
		ListLocks tp = new ListLocks();
		tp.execute(args);
	}
	
	@Override
	public void initDecodes()
		throws DecodesException
	{
		DecodesInterface.initDecodes(cmdLineArgs.getPropertiesFile());
	}

	@Override
	public void createDatabase() {}
	
	@Override
	public void tryConnect() {}



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy