csip.SessionStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of csip-core Show documentation
Show all versions of csip-core Show documentation
The Cloud Services Integration Platform is a SoA implementation to offer a Model-as-a-Service framework, Application Programming Interface, deployment infrastructure, and service implementations for environmental modeling.
/*
* $Id: SessionStore.java 27bed8415b8b 2019-01-31 od $
*
* This file is part of the Cloud Services Integration Platform (CSIP),
* a Model-as-a-Service framework, API and application suite.
*
* 2012-2019, Olaf David and others, OMSLab, Colorado State University.
*
* OMSLab licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
package csip;
import java.util.Set;
/**
* session store.
*/
interface SessionStore extends AutoCloseable {
/**
* Set a model session.
*
* @param suid
* @param session
* @throws Exception
*/
void setSession(String suid, ModelSession session) throws Exception;
/**
* Get a model session
* @param suid
* @return the model session
* @throws Exception
*/
ModelSession getSession(String suid) throws Exception;
boolean hasSession(String suid) throws Exception;
/**
* Remove a model session.
*
* @param suid
*/
void removeSession(String suid);
/**
*
* @param skip the number of keys to skip
* @param limit the number of keys to return (0) means all
* @param sortby the 'field' to sort by.
* @param sortAscending true if sort is ascending, false otherwise.
* @return the keys.
*/
Set keys(int skip, int limit, String sortby, boolean sortAscending);
/**
* Get the number of elements.
* @return the number of elements.
*/
long getCount();
long countSessionsByState(String state);
/**
* Ping the store.
*
* @throws Exception if something is wrong.
*/
void ping() throws Exception;
void registerResources(boolean register);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy