org.apache.oozie.sla.service
Class SLAService

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

public class SLAService
extends Object
implements Service


Field Summary
static String CONF_ALERT_EVENTS
           
static String CONF_CALCULATOR_IMPL
           
static String CONF_CAPACITY
           
static String CONF_EVENTS_MODIFIED_AFTER
           
static String CONF_JOB_EVENT_LATENCY
           
static String CONF_PREFIX
           
static XLog LOG
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
SLAService()
           
 
Method Summary
 boolean addRegistrationEvent(SLARegistrationBean reg)
           
 boolean addStatusEvent(String jobId, String status, org.apache.oozie.client.event.JobEvent.EventStatus eventStatus, Date startTime, Date endTime)
           
 void destroy()
          Destroy the service.
 Class<? extends Service> getInterface()
          Return the public interface of the service.
 SLACalculator getSLACalculator()
           
 void init(Services services)
          Initialize the service.
static boolean isEnabled()
           
 void removeRegistration(String jobId)
           
 void runSLAWorker()
           
 boolean updateRegistrationEvent(SLARegistrationBean reg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_PREFIX

public static final String CONF_PREFIX
See Also:
Constant Field Values

CONF_CALCULATOR_IMPL

public static final String CONF_CALCULATOR_IMPL
See Also:
Constant Field Values

CONF_CAPACITY

public static final String CONF_CAPACITY
See Also:
Constant Field Values

CONF_ALERT_EVENTS

public static final String CONF_ALERT_EVENTS
See Also:
Constant Field Values

CONF_EVENTS_MODIFIED_AFTER

public static final String CONF_EVENTS_MODIFIED_AFTER
See Also:
Constant Field Values

CONF_JOB_EVENT_LATENCY

public static final String CONF_JOB_EVENT_LATENCY
See Also:
Constant Field Values

LOG

public static XLog LOG
Constructor Detail

SLAService

public SLAService()
Method Detail

init

public void init(Services services)
          throws ServiceException
Description copied from interface: Service
Initialize the service.

Invoked by the Service singleton at start up time.

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

destroy

public void destroy()
Description copied from interface: Service
Destroy the service.

Invoked by the Service singleton at shutdown time.

Specified by:
destroy in interface Service

getInterface

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

Services are retrieved by its public interface. Specializations of services must return the public interface.

Specified by:
getInterface in interface Service
Returns:
the interface of the service.

isEnabled

public static boolean isEnabled()

getSLACalculator

public SLACalculator getSLACalculator()

runSLAWorker

public void runSLAWorker()

addRegistrationEvent

public boolean addRegistrationEvent(SLARegistrationBean reg)
                             throws ServiceException
Throws:
ServiceException

updateRegistrationEvent

public boolean updateRegistrationEvent(SLARegistrationBean reg)
                                throws ServiceException
Throws:
ServiceException

addStatusEvent

public boolean addStatusEvent(String jobId,
                              String status,
                              org.apache.oozie.client.event.JobEvent.EventStatus eventStatus,
                              Date startTime,
                              Date endTime)
                       throws ServiceException
Throws:
ServiceException

removeRegistration

public void removeRegistration(String jobId)


Copyright © 2013 Apache Software Foundation. All Rights Reserved.