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.boolean
expired
(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.long
Gets the time out.long
Gets the time out after completion.remove
(long id) Removes the.void
setTimeOut
(long timeout) Sets the time out.void
setTimeOutAfterCompletion
(long timeoutAfterCompletion) Sets the time out after completion.void
update
(AbstractTicket ticket) Update.Methods inherited from class ecmwf.common.ecaccess.StorageRepository
getAttribute, getMBeanInfo, getThreadsSize, initialize, invoke, nextStep, shutdown, toString
Methods inherited from class ecmwf.common.ecaccess.MBeanRepository
clear, containsKey, containsValue, getComparator, getList, getList, getSize, getStatus, getValue, getWakeup, put, removeKey, removeValue, setComparator, setMaxAuthorisedSize, setWakeup, sort
Methods inherited from class ecmwf.common.ecaccess.MBeanScheduler
close, getMonitorName, setAttribute
Methods 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, wakeup
Methods inherited from class ecmwf.common.technical.WakeupThread
isSleeping, waitFor
Methods 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:
getKey
in classMBeanRepository<AbstractTicket>
- Parameters:
ticket
- the object- Returns:
- the key
-
getStatus
Gets the status. Gets the status.- Overrides:
getStatus
in classMBeanRepository<AbstractTicket>
- Parameters:
ticket
- the object- Returns:
- the status
-
expired
Expired. Expired.- Overrides:
expired
in classStorageRepository<AbstractTicket>
- Parameters:
ticket
- the object- Returns:
- true, if successful
-
update
Update. Update.- Specified by:
update
in classStorageRepository<AbstractTicket>
- Parameters:
ticket
- the object
-