Lines Matching defs:job

17 package com.android.server.job;
20 import android.app.job.JobInfo;
36 import com.android.server.job.controllers.JobStatus;
53 * Maintains the master list of jobs that the job scheduler is tracking. These jobs are compared by
59 * This is important b/c {@link com.android.server.job.JobStore.WriteJobsMapToDiskRunnable}
60 * and {@link com.android.server.job.JobStore.ReadJobMapFromDiskRunnable} lock on that
92 * @return A freshly initialized job store object, with no loaded jobs.
102 * Construct the instance of the job store. This results in a blocking read from disk.
109 File jobDir = new File(systemDir, "job");
119 * Add a job to the master list, persisting it if necessary. If the JobStatus already exists,
131 Slog.d(TAG, "Added job status to store: " + jobStatus);
158 * Remove the provided job. Will also delete the job if it was persisted.
159 * @return Whether or not the job existed to be removed.
165 Slog.d(TAG, "Couldn't remove job: didn't exist: " + jobStatus);
238 /** Tag corresponds to constraints this job needs. */
299 out.startTag(null, "job-info");
304 Slog.d(TAG, "Saving job " + jobStatus.getJobId());
306 out.startTag(null, "job");
311 out.endTag(null, "job");
313 out.endTag(null, "job-info");
323 Slog.v(TAG, "Error writing out job data.", e);
332 /** Write out a tag with data comprising the required fields of this job and its client. */
348 * Write out a tag with data identifying this job's constraints. If the constraint isn't here
370 final JobInfo job = jobStatus.getJob();
373 out.attribute(null, "period", Long.toString(job.getIntervalMillis()));
391 // This also helps the case where the job is idle -> these aren't allowed to specify
395 out.attribute(null, "backoff-policy", Integer.toString(job.getBackoffPolicy()));
396 out.attribute(null, "initial-backoff", Long.toString(job.getInitialBackoffMillis()));
398 if (job.isPeriodic()) {
407 * Runnable that reads list of persisted job from xml. This is run once at start up, so doesn't
408 * need to go through {@link JobStore#add(com.android.server.job.controllers.JobStatus)}.
469 if ("job-info".equals(tagName)) {
484 // Read each <job/>
487 // Start reading job.
488 if ("job".equals(tagName)) {
496 Slog.d(TAG, "Error reading job from file.");
508 * @param parser Xml parser at the beginning of a "<job/>" tag. The next "parser.next()" call
509 * will take the parser into the body of the job tag.
510 * @return Newly instantiated job holding all the information we just read out of the xml tag.
517 // Read out job identifier attributes.
523 Slog.e(TAG, "Error parsing job's required fields, skipping");
582 Slog.d(TAG, "Error reading job execution criteria, skipping.");
615 // Pull out required fields from <job> attributes.
645 * on whether the back-off was set when the job was first scheduled.