public class ClockManager extends Object implements IClockManagerSPI
Constructor and Description |
---|
ClockManager() |
Modifier and Type | Method and Description |
---|---|
String |
add(SessionConfig sessionConfig,
ClockConfig clockConfig,
ITransaction transaction)
Add a clock.
|
void |
addOrUpdate(SessionConfig sessionConfig,
ClockConfig clockConfig,
ITransaction transaction)
Update the configuration of a clock.
|
void |
checkSchedule(SessionConfig sessionConfig,
ITransaction transaction)
This method is called at regular intervals by the framework.
|
void |
delete(SessionConfig sessionConfig,
String clockId,
ITransaction transaction)
Delete a clock.
|
void |
disable(SessionConfig sessionConfig,
String clockId,
ITransaction transaction)
Set the "False" value to the enable property of a clock.
|
void |
enable(SessionConfig sessionConfig,
String clockId,
ITransaction transaction)
Set the "True" value to the enable property of a clock.
|
void |
executeSchedule(ClockConfig clockConfig)
Executes a clock implementation.
|
void |
executeSchedule(SessionConfig sessionConfig,
ClockConfig clockConfig,
ITransaction transaction)
Deprecated.
|
ClockConfig |
get(SessionConfig sessionConfig,
String clockId,
ITransaction transaction)
Get the configuration of the clock.
|
Collection<String> |
getClockIdsByServiceId(SessionConfig sessionConfig,
String serviceId,
ITransaction transaction)
Return the Ids of all clocks registered for the specified service.
|
Collection<ClockConfig> |
getDisabledClocks(ITransaction transaction)
Get disabled clocks.
|
Collection<ClockConfig> |
getRunningClocks(long timeSpent,
ITransaction transaction)
Get clocks running longer than a specific time in milliseconds.
|
Collection<ClockConfig> |
getRunningClocksInHalfMaxRunTime(ITransaction transaction)
Get clocks running longer than half of its configured maximum run time.
|
boolean |
isPortalClockRunning(SessionConfig sessionConfig,
ITransaction transaction)
Verify if the portal clock is running.
|
boolean |
setRunning(SessionConfig sessionConfig,
String clockId,
boolean running,
ITransaction transaction)
Sets the running status of a clock in the database.
|
void |
update(SessionConfig sessionConfig,
ClockConfig clockConfig,
ITransaction transaction)
Update the configuration of a clock.
|
public void checkSchedule(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
checkSchedule
in interface IClockManager
ManagerException
PortalException
@Deprecated public void executeSchedule(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
IClockManager
executeSchedule
in interface IClockManager
ManagerException
PortalException
public void executeSchedule(ClockConfig clockConfig) throws PortalException
IClockManager
executeSchedule
in interface IClockManager
clockConfig
- the clock configuration.PortalException
public String add(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
IClockManager
add
in interface IClockManager
ManagerException
PortalException
public void addOrUpdate(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
IClockManager
addOrUpdate
in interface IClockManager
ManagerException
PortalException
public void update(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
IClockManager
update
in interface IClockManager
ManagerException
PortalException
public void delete(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
IClockManager
delete
in interface IClockManager
ManagerException
PortalException
public void enable(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
IClockManager
enable
in interface IClockManager
ManagerException
PortalException
public void disable(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
IClockManager
disable
in interface IClockManager
ManagerException
PortalException
public ClockConfig get(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
IClockManager
get
in interface IClockManager
ManagerException
PortalException
public boolean isPortalClockRunning(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
IClockManager
isPortalClockRunning
in interface IClockManager
ManagerException
PortalException
public boolean setRunning(SessionConfig sessionConfig, String clockId, boolean running, ITransaction transaction) throws ManagerException, PortalException
IClockManager
setRunning
in interface IClockManager
ManagerException
PortalException
public Collection<String> getClockIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws ManagerException, PortalException
IClockManager
getClockIdsByServiceId
in interface IClockManager
serviceId
- The Id of the service whose clocks you want to return.ManagerException
PortalException
public Collection<ClockConfig> getDisabledClocks(ITransaction transaction) throws PortalException
IClockManagerSPI
getDisabledClocks
in interface IClockManagerSPI
PortalException
public Collection<ClockConfig> getRunningClocks(long timeSpent, ITransaction transaction) throws PortalException
IClockManagerSPI
getRunningClocks
in interface IClockManagerSPI
timeSpent
- minimum time in milliseconds that the clock has been running.transaction
- transaction for persistence access.PortalException
public Collection<ClockConfig> getRunningClocksInHalfMaxRunTime(ITransaction transaction) throws PortalException
IClockManagerSPI
getRunningClocksInHalfMaxRunTime
in interface IClockManagerSPI
transaction
- transaction for persistence access.PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.