org.gwe.app.daemon.domain
Class AgentDomain

java.lang.Object
  extended by org.gwe.app.daemon.domain.BaseDomain
      extended by org.gwe.app.daemon.domain.AgentDomain

public class AgentDomain
extends BaseDomain

Since:
Sep 19, 2007
Author:
Marco Ruiz

Field Summary
static int JOB_PREPARATION_OVER_ALLOCATIONS_FACTOR
           
 
Fields inherited from class org.gwe.app.daemon.domain.BaseDomain
allocationDAO, computeResourceDAO, headResourceDAO, jobDAO, jobExecutionDAO, orderDAO
 
Constructor Summary
AgentDomain()
           
 
Method Summary
 boolean attachAllocation(int allocId, ComputeResourceInfo compRes)
           
 void cleanAllocAndFinalizeJobAsync(int allocId, java.lang.String execId, java.io.Serializable result)
           
 ShutdownDaemonRequest disposeLiveAllocation(int allocId, java.lang.Exception ex)
           
 DaemonRequest<?> extractRequestFromNextJobAssignedBlocking(int allocId)
           
 void flagNextPreparedJobAsReady()
           
 DaemonRequest<?> getCurrentProcessingExecution(int allocId)
           
 void launchPreparers(java.util.List<JobInfo> jobs)
           
 void pairNextJobAndAllocationReady()
           
 java.util.List<AllocationInfo> prepareMoreAllocations()
           
 void runUpdateOrdersCycle()
           
 java.util.List<JobInfo> selectNextJobBatch()
           
 void setConfig(DaemonConfigDesc config)
           
 void triggerMoreJobsAndAllocationPreparation()
           
 void updateOrder(int orderId, int amount)
           
 void wrapUpJob(JobExecutionInfo exec)
           
 
Methods inherited from class org.gwe.app.daemon.domain.BaseDomain
getAllocationDAO, getComputeResourceDAO, getConfig, getHeadResourceDAO, getJobDAO, getJobExecutionDAO, getOrderDAO, setAllocationDAO, setComputeResourceDAO, setHeadResourceDAO, setJobDAO, setJobExecutionDAO, setOrderDAO, verifyAccount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOB_PREPARATION_OVER_ALLOCATIONS_FACTOR

public static final int JOB_PREPARATION_OVER_ALLOCATIONS_FACTOR
See Also:
Constant Field Values
Constructor Detail

AgentDomain

public AgentDomain()
Method Detail

setConfig

public void setConfig(DaemonConfigDesc config)
Overrides:
setConfig in class BaseDomain

attachAllocation

@Transactional(propagation=REQUIRES_NEW)
public boolean attachAllocation(int allocId,
                                              ComputeResourceInfo compRes)
                         throws AllocationNotFoundException,
                                AllocationTooLateException
Throws:
AllocationNotFoundException
AllocationTooLateException

extractRequestFromNextJobAssignedBlocking

@Transactional(propagation=REQUIRES_NEW)
public DaemonRequest<?> extractRequestFromNextJobAssignedBlocking(int allocId)
                                                           throws AllocationNotFoundException,
                                                                  NoJobToProcessException
Throws:
AllocationNotFoundException
NoJobToProcessException

getCurrentProcessingExecution

public DaemonRequest<?> getCurrentProcessingExecution(int allocId)
                                               throws AllocationNotFoundException,
                                                      NoJobToProcessException
Throws:
AllocationNotFoundException
NoJobToProcessException

cleanAllocAndFinalizeJobAsync

public void cleanAllocAndFinalizeJobAsync(int allocId,
                                          java.lang.String execId,
                                          java.io.Serializable result)
                                   throws AllocationNotFoundException
Throws:
AllocationNotFoundException

disposeLiveAllocation

@Transactional(propagation=REQUIRES_NEW)
public ShutdownDaemonRequest disposeLiveAllocation(int allocId,
                                                                 java.lang.Exception ex)

triggerMoreJobsAndAllocationPreparation

public void triggerMoreJobsAndAllocationPreparation()

prepareMoreAllocations

@Transactional(propagation=REQUIRES_NEW)
public java.util.List<AllocationInfo> prepareMoreAllocations()

selectNextJobBatch

@Transactional(propagation=REQUIRES_NEW)
public java.util.List<JobInfo> selectNextJobBatch()

launchPreparers

@Transactional(propagation=NEVER)
public void launchPreparers(java.util.List<JobInfo> jobs)

flagNextPreparedJobAsReady

@Transactional(propagation=REQUIRES_NEW)
public void flagNextPreparedJobAsReady()
                                throws java.lang.InterruptedException,
                                       java.util.concurrent.ExecutionException
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException

wrapUpJob

@Transactional(propagation=REQUIRES_NEW)
public void wrapUpJob(JobExecutionInfo exec)

pairNextJobAndAllocationReady

@Transactional(propagation=REQUIRES_NEW)
public void pairNextJobAndAllocationReady()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

runUpdateOrdersCycle

public void runUpdateOrdersCycle()

updateOrder

@Transactional(propagation=REQUIRES_NEW)
public void updateOrder(int orderId,
                                      int amount)


Copyright © 2007-2009. All Rights Reserved.