org.apache.oozie.service
Class StoreService

java.lang.Object
  extended by org.apache.oozie.service.StoreService
All Implemented Interfaces:
Service

public class StoreService
extends Object
implements Service

Base service for persistency of jobs and actions.


Field Summary
 
Fields inherited from interface org.apache.oozie.service.Service
CONF_PREFIX, DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
StoreService()
           
 
Method Summary
 void destroy()
          Destroy the StoreService
 javax.persistence.EntityManager getEntityManager()
          Return EntityManager
 Class<? extends Service> getInterface()
          Return the public interface of the service.
<S extends Store>
S
getStore(Class<S> klass)
          Return instance of store.
<S extends Store,T extends Store>
S
getStore(Class<S> klass, T store)
          Return instance of store with an EntityManager pointing to an existing Store.
 void init(Services services)
          Initializes the StoreService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreService

public StoreService()
Method Detail

getStore

public <S extends Store> S getStore(Class<S> klass)
                         throws StoreException
Return instance of store.

Returns:
Store.
Throws:
StoreException

getStore

public <S extends Store,T extends Store> S getStore(Class<S> klass,
                                                    T store)
                         throws StoreException
Return instance of store with an EntityManager pointing to an existing Store.

Returns:
Store.
Throws:
StoreException

getInterface

public Class<? extends Service> getInterface()
Return the public interface of the service.

Specified by:
getInterface in interface Service
Returns:
StoreService.

init

public void init(Services services)
          throws ServiceException
Initializes the StoreService.

Specified by:
init in interface Service
Parameters:
services - services instance.
Throws:
ServiceException - thrown if the service could not initialize.

destroy

public void destroy()
Destroy the StoreService

Specified by:
destroy in interface Service

getEntityManager

public javax.persistence.EntityManager getEntityManager()
Return EntityManager



Copyright © 2013 Apache Software Foundation. All Rights Reserved.