Search in sources :

Example 16 with UserIdentificationImpl

use of org.ow2.proactive.scheduler.job.UserIdentificationImpl in project scheduling by ow2-proactive.

the class SchedulerFrontendState method renewSession.

synchronized void renewSession() throws NotConnectedException {
    UniqueID id = checkAccess();
    UserIdentificationImpl ident = identifications.get(id).getUser();
    // renew session for this user
    renewUserSession(id, ident);
}
Also used : UniqueID(org.objectweb.proactive.core.UniqueID) UserIdentificationImpl(org.ow2.proactive.scheduler.job.UserIdentificationImpl)

Example 17 with UserIdentificationImpl

use of org.ow2.proactive.scheduler.job.UserIdentificationImpl in project scheduling by ow2-proactive.

the class SchedulerFrontendState method prepare.

/**
 * Prepare the job in the frontend
 *
 * @param jobStates
 *            a temporary set of jobs
 * @param js
 *            the current job to be prepared
 * @param finished
 *            if the job is finished or not
 */
private void prepare(Set<JobState> jobStates, ClientJobState js, boolean finished) {
    jobStates.add(js);
    UserIdentificationImpl uIdent = new UserIdentificationImpl(js.getOwner());
    IdentifiedJob ij = new IdentifiedJob(js.getId(), uIdent, js.getGenericInformation());
    jobs.put(js.getId(), ij);
    jobsMap.put(js.getId(), js);
    ij.setFinished(finished);
}
Also used : IdentifiedJob(org.ow2.proactive.scheduler.job.IdentifiedJob) UserIdentificationImpl(org.ow2.proactive.scheduler.job.UserIdentificationImpl)

Example 18 with UserIdentificationImpl

use of org.ow2.proactive.scheduler.job.UserIdentificationImpl in project scheduling by ow2-proactive.

the class SchedulerFrontendState method getUsers.

synchronized List<SchedulerUserInfo> getUsers() {
    List<SchedulerUserInfo> users = new ArrayList<>(identifications.size());
    for (ListeningUser listeningUser : identifications.values()) {
        UserIdentificationImpl user = listeningUser.getUser();
        users.add(new SchedulerUserInfo(user.getHostName(), user.getUsername(), user.getConnectionTime(), user.getLastSubmitTime(), user.getSubmitNumber()));
    }
    return users;
}
Also used : SchedulerUserInfo(org.ow2.proactive.scheduler.job.SchedulerUserInfo) ArrayList(java.util.ArrayList) UserIdentificationImpl(org.ow2.proactive.scheduler.job.UserIdentificationImpl)

Aggregations

UserIdentificationImpl (org.ow2.proactive.scheduler.job.UserIdentificationImpl)16 UniqueID (org.objectweb.proactive.core.UniqueID)9 PermissionException (org.ow2.proactive.scheduler.common.exception.PermissionException)6 JobAlreadyFinishedException (org.ow2.proactive.scheduler.common.exception.JobAlreadyFinishedException)3 JobCreationException (org.ow2.proactive.scheduler.common.exception.JobCreationException)3 IOException (java.io.IOException)2 Test (org.junit.Test)2 ImmediateService (org.objectweb.proactive.annotation.ImmediateService)2 AlreadyConnectedException (org.ow2.proactive.scheduler.common.exception.AlreadyConnectedException)2 NotConnectedException (org.ow2.proactive.scheduler.common.exception.NotConnectedException)2 SubmissionClosedException (org.ow2.proactive.scheduler.common.exception.SubmissionClosedException)2 UnknownJobException (org.ow2.proactive.scheduler.common.exception.UnknownJobException)2 UnknownTaskException (org.ow2.proactive.scheduler.common.exception.UnknownTaskException)2 IdentifiedJob (org.ow2.proactive.scheduler.job.IdentifiedJob)2 InternalJob (org.ow2.proactive.scheduler.job.InternalJob)2 ChangePriorityPermission (org.ow2.proactive.scheduler.permissions.ChangePriorityPermission)2 KeyException (java.security.KeyException)1 ArrayList (java.util.ArrayList)1 ExecutionException (java.util.concurrent.ExecutionException)1 ExecutorService (java.util.concurrent.ExecutorService)1