Tabnine Logo
ServiceRegistry.getCurrentJob
Code IndexAdd Tabnine to your IDE (free)

How to use
getCurrentJob
method
in
org.opencastproject.serviceregistry.api.ServiceRegistry

Best Java code snippets using org.opencastproject.serviceregistry.api.ServiceRegistry.getCurrentJob (Showing top 3 results out of 315)

origin: opencast/opencast

/**
 * {@inheritDoc}
 *
 * @see org.opencastproject.job.api.JobProducer#acceptJob(org.opencastproject.job.api.Job)
 */
@Override
public void acceptJob(final Job job) throws ServiceRegistryException {
 final Job runningJob;
 try {
  job.setStatus(Job.Status.RUNNING);
  runningJob = getServiceRegistry().updateJob(job);
 } catch (NotFoundException e) {
  throw new IllegalStateException(e);
 }
 executor.submit(new JobRunner(runningJob, getServiceRegistry().getCurrentJob()));
}
origin: opencast/opencast

 Float jobLoad = Float.parseFloat(request.getParameter("jobLoad"));
 job = ((ServiceRegistryJpaImpl) serviceRegistry).createJob(host, jobType, operation, arguments, payload,
    start, serviceRegistry.getCurrentJob(), jobLoad);
} else {
 job = ((ServiceRegistryJpaImpl) serviceRegistry).createJob(host, jobType, operation, arguments, payload,
     start, serviceRegistry.getCurrentJob());
origin: opencast/opencast

httpUriRequest.setHeader(SecurityConstants.AUTHORIZATION_HEADER, "true");
if (serviceRegistry != null && serviceRegistry.getCurrentJob() != null) {
 httpUriRequest.setHeader(CURRENT_JOB_HEADER, Long.toString(serviceRegistry.getCurrentJob().getId()));
org.opencastproject.serviceregistry.apiServiceRegistrygetCurrentJob

Javadoc

Gets the current running job

Popular methods of ServiceRegistry

  • createJob
    Create and store a new job. If enqueueImmediately is true, the job will be in the Status#QUEUED stat
  • getJob
    Gets a receipt by its ID, or null if not found
  • count
    Count the number of jobs that match the specified parameters.
  • getHostRegistrations
    Finds all host registrations, including offline hosts and those in maintenance mode.
  • getMaxLoadOnNode
    Returns the maximum load that can be handled by a given node. Note that this load is *not* 1-to-1 eq
  • getOwnLoad
    Gets the load value for the current host (ie, the host this service registry lives on
  • getServiceRegistrationsByLoad
    Finds the service registrations for this kind of job, ordered by load (lightest to heaviest).
  • incident
    Return a facility to record job incidents.
  • setCurrentJob
    Sets the current running job
  • updateJob
    Update the job in the database
  • countByHost
    Count the number of jobs in this Status on this host
  • countByOperation
    Count the number of jobs running the given operation in this Status.
  • countByHost,
  • countByOperation,
  • countOfAbnormalServices,
  • disableHost,
  • enableHost,
  • getActiveJobs,
  • getChildJobs,
  • getCurrentHostLoads,
  • getJobs

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Join (org.hibernate.mapping)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now