Spring for Apache Hadoop

org.springframework.yarn.batch.repository
Class AbstractRemoteDao

java.lang.Object
  extended by org.springframework.yarn.batch.repository.AbstractRemoteDao
Direct Known Subclasses:
RemoteExecutionContextDao, RemoteJobExecutionDao, RemoteJobInstanceDao, RemoteStepExecutionDao

public abstract class AbstractRemoteDao
extends java.lang.Object

Base class for all daos handling remote calls through AppmasterScOperations.

Author:
Janne Valkealahti

Constructor Summary
AbstractRemoteDao()
          Default constructor.
AbstractRemoteDao(AppmasterMindScOperations appmasterScOperations)
          Constructor which sets the AppmasterMindScOperations.
 
Method Summary
protected  void checkResponseMayThrow(BaseResponseObject responseObject)
          Checks status of a response and throws an exception if response status message is set to 'error'.
protected  org.springframework.dao.DataAccessException convertException(java.lang.Exception e)
          Converts given exception to Spring dao exception.
 AppmasterMindScOperations getAppmasterScOperations()
          Gets the AppmasterMindScOperations for this implementation.
 void setAppmasterScOperations(AppmasterMindScOperations appmasterScOperations)
          Sets the AppmasterMindScOperations for this implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRemoteDao

public AbstractRemoteDao()
Default constructor. AppmasterMindScOperations should be set via setAppmasterScOperations(AppmasterMindScOperations) method.


AbstractRemoteDao

public AbstractRemoteDao(AppmasterMindScOperations appmasterScOperations)
Constructor which sets the AppmasterMindScOperations.

Parameters:
appmasterScOperations - AppmasterMindScOperations to set
Method Detail

getAppmasterScOperations

public AppmasterMindScOperations getAppmasterScOperations()
Gets the AppmasterMindScOperations for this implementation.

Returns:
AppmasterMindScOperations used for this implementation

setAppmasterScOperations

public void setAppmasterScOperations(AppmasterMindScOperations appmasterScOperations)
Sets the AppmasterMindScOperations for this implementation.

Parameters:
appmasterScOperations - the AppmasterMindScOperations

checkResponseMayThrow

protected void checkResponseMayThrow(BaseResponseObject responseObject)
                              throws java.rmi.RemoteException
Checks status of a response and throws an exception if response status message is set to 'error'.

Parameters:
responseObject - the response object
Throws:
java.rmi.RemoteException - if state is set to error

convertException

protected org.springframework.dao.DataAccessException convertException(java.lang.Exception e)
Converts given exception to Spring dao exception.

Parameters:
e - the exception
Returns:
Converted exception

Spring for Apache Hadoop