Class TicketRepository
- All Implemented Interfaces:
MBeanService,MonitorCallback,Closeable,AutoCloseable,Runnable
The Class TicketRepository.
-
Field Summary
Fields inherited from class ecmwf.common.ecaccess.ECaccessScheduler
NEXT_STEP_ABORT, NEXT_STEP_CONTINUE, NEXT_STEP_DELAY, NEXT_STEP_INIT, SCHEDULER_STATE_CLOSING, SCHEDULER_STATE_JAMMED, SCHEDULER_STATE_OFFLINE, SCHEDULER_STATE_ONHOLD, SCHEDULER_STATE_ONLINE, SCHEDULER_STATE_OPENING, states, steps -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<E extends AbstractTicket>
Eadd(E ticket) Adds the new ticket.<E extends AbstractTicket>
Eadd(E ticket, long id) Adds the new ticket.check(long id, boolean wait) Check.check(long id, long wait) Check.booleanexpired(AbstractTicket ticket) Expired.get(long id) Gets the.<T extends AbstractTicket>
TGets the.getKey(AbstractTicket ticket) Gets the key.getStatus(AbstractTicket ticket) Gets the status.longGets the time out.longGets the time out after completion.remove(long id) Removes the.voidsetTimeOut(long timeout) Sets the time out.voidsetTimeOutAfterCompletion(long timeoutAfterCompletion) Sets the time out after completion.voidupdate(AbstractTicket ticket) Update.Methods inherited from class ecmwf.common.ecaccess.StorageRepository
getAttribute, getMBeanInfo, getThreadsSize, initialize, invoke, nextStep, shutdown, toStringMethods inherited from class ecmwf.common.ecaccess.MBeanRepository
clear, containsKey, containsValue, getComparator, getList, getList, getSize, getStatus, getValue, getWakeup, put, removeKey, removeValue, setComparator, setMaxAuthorisedSize, setWakeup, sortMethods inherited from class ecmwf.common.ecaccess.MBeanScheduler
close, getMonitorName, setAttributeMethods inherited from class ecmwf.common.ecaccess.ECaccessScheduler
configurableRun, deactivateMonitor, getActivity, getDelay, getJammedTimeout, getLastStepTime, getMonitorManager, getNextStep, getSchedulerState, getStartDate, getStepTime, isInitialized, isJammed, isOnHold, isRunning, onHold, setDelay, setJammedTimeout, setOnhold, setTimeRanges, start, wakeupMethods inherited from class ecmwf.common.technical.WakeupThread
isSleeping, waitForMethods inherited from class ecmwf.common.technical.ThreadService.ConfigurableRunnable
execute, execute, getContextClassLoader, getPriority, getThreadName, interrupt, interrupted, isAlive, isStarted, join, join, run, setContextClassLoader, setForceCookie, setInheritCookie, setPriority, setThreadNameAndCookie
-
Constructor Details
-
TicketRepository
Instantiates a new ticket repository.- Parameters:
name- the name
-
-
Method Details
-
add
Adds the new ticket.- Type Parameters:
E- the element type- Parameters:
ticket- the ticket- Returns:
- the e
-
add
Adds the new ticket.- Type Parameters:
E- the element type- Parameters:
ticket- the ticketid- the id- Returns:
- the e
-
getTimeOut
public long getTimeOut()Gets the time out.- Returns:
- the time out
-
setTimeOut
public void setTimeOut(long timeout) Sets the time out.- Parameters:
timeout- the new time out
-
getTimeOutAfterCompletion
public long getTimeOutAfterCompletion()Gets the time out after completion.- Returns:
- the time out after completion
-
setTimeOutAfterCompletion
public void setTimeOutAfterCompletion(long timeoutAfterCompletion) Sets the time out after completion.- Parameters:
timeoutAfterCompletion- the new time out after completion
-
get
-
get
Gets the.- Type Parameters:
T- the generic type- Parameters:
id- the idclazz- the clazz- Returns:
- the abstract ticket
-
check
Check.- Parameters:
id- the idwait- the wait- Returns:
- the abstract ticket
- Throws:
IOException- Signals that an I/O exception has occurred.
-
check
Check.- Parameters:
id- the idwait- the wait- Returns:
- the abstract ticket
- Throws:
IOException- Signals that an I/O exception has occurred.
-
remove
Removes the.- Parameters:
id- the id- Returns:
- the abstract ticket
-
getKey
Gets the key. Gets the key.- Overrides:
getKeyin classMBeanRepository<AbstractTicket>- Parameters:
ticket- the object- Returns:
- the key
-
getStatus
Gets the status. Gets the status.- Overrides:
getStatusin classMBeanRepository<AbstractTicket>- Parameters:
ticket- the object- Returns:
- the status
-
expired
Expired. Expired.- Overrides:
expiredin classStorageRepository<AbstractTicket>- Parameters:
ticket- the object- Returns:
- true, if successful
-
update
Update. Update.- Specified by:
updatein classStorageRepository<AbstractTicket>- Parameters:
ticket- the object
-