orc.orchard
Class Account

java.lang.Object
  extended by orc.orchard.Account

public abstract class Account
extends java.lang.Object

Manage a group of jobs associated with a user account. Note that jobs are tracked solely in memory, mainly because it would be a hassle to keep the database up-to-date otherwise.

Author:
quark

Constructor Summary
Account()
           
 
Method Summary
 void addJob(java.lang.String id, Job job)
           
 void finishOldJobs()
           
 Job getJob(java.lang.String id)
           
abstract  boolean isGuest()
           
 java.util.Set<java.lang.String> jobIDs()
           
 java.util.List<Job> jobs()
           
protected abstract  void onNoMoreJobs()
           
 void setEventBufferSize(java.lang.Integer eventBufferSize)
           
 void setLifespan(org.postgresql.util.PGInterval lifespan)
           
 void setQuota(java.lang.Integer quota)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Account

public Account()
Method Detail

setLifespan

public void setLifespan(org.postgresql.util.PGInterval lifespan)

setQuota

public void setQuota(java.lang.Integer quota)

addJob

public void addJob(java.lang.String id,
                   Job job)
            throws QuotaException
Throws:
QuotaException

getJob

public Job getJob(java.lang.String id)
           throws InvalidJobException
Throws:
InvalidJobException

jobs

public java.util.List<Job> jobs()

jobIDs

public java.util.Set<java.lang.String> jobIDs()

onNoMoreJobs

protected abstract void onNoMoreJobs()

isGuest

public abstract boolean isGuest()

finishOldJobs

public void finishOldJobs()

setEventBufferSize

public void setEventBufferSize(java.lang.Integer eventBufferSize)