public class ErrataCacheManager extends HibernateFactory
Modifier and Type | Method and Description |
---|---|
static DataResult |
allServerIdsForOrg(Org org)
Returns all Server ids for the given org.
|
static int |
countServersInQueue(Org org)
Returns the server count that are in the queue for the given org.
|
static void |
deleteCacheEntriesForChannelErrata(java.lang.Long cid,
java.util.List<java.lang.Long> eids)
Delete errata cache entries for systems belonging to a certain channel
|
static void |
deleteCacheEntriesForChannelPackages(java.lang.Long cid,
java.util.List<java.lang.Long> pids)
Remove cache entries for particular packages usefull if you are removing
packages from a channel
|
static void |
deleteCacheEntriesForErrataPackages(java.lang.Long eid,
java.util.List<java.lang.Long> pids)
Delete errata cache entries for systems belonging to a certain channel
|
static int |
deleteErrataCacheQueue(Org org)
Deletes all the ErrataCache items for the given org.
|
static int |
deleteNeededErrataCache(java.lang.Long sid)
Delete all records from NeededErrata cache for the server provided.
|
static int |
deleteNeededErrataCache(java.lang.Long sid,
java.lang.Long eid)
Deletes record from NeededErrata cache table.
|
static int |
deleteNeededPackageCache(java.lang.Long sid)
Delete all records from NeededPackage cache for the server provided.
|
static int |
deleteNeededPackageCache(java.lang.Long sid,
java.lang.Long errataId,
java.lang.Long packageId)
Deletes record from NeededPackage cache table.
|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages show up on the
correct class
|
static void |
insertCacheForChannelErrata(java.util.List<java.lang.Long> channelIdsToUpdate,
Errata errata)
updates the errata caches for the channels passed in.
|
static void |
insertCacheForChannelErrataAsync(java.util.List<java.lang.Long> channelIdsToUpdate,
Errata errata)
Asynchronusly updates the errata caches for the channels passed in.
|
static void |
insertCacheForChannelErrataAsync(java.util.List<java.lang.Long> channelIdsToUpdate,
java.lang.Long errataId)
Asynchronusly updates the errata caches for the channels passed in.
|
static void |
insertCacheForChannelPackages(java.lang.Long cid,
java.lang.Long eid,
java.util.List<java.lang.Long> pids)
Insert the new cache entries for a list of packages
|
static void |
insertCacheForChannelPackagesAsync(java.util.List<java.lang.Long> channelIdsToUpdate,
java.util.List<java.lang.Long> packageIds)
Asynchronusly updates the errata caches for the channels passed in.
|
static int |
insertNeededErrataCache(java.lang.Long sid,
java.lang.Long eid,
java.lang.Long pid)
Inserts record into NeededErrata cache table
|
static DataResult |
packagesNeedingUpdates(java.lang.Long sid)
Returns packages needing updates for the given server id.
|
static void |
updateCacheForChannelsAsync(java.util.List<java.lang.Long> channelIdsToUpdate)
Asynchronusly updates the errata caches for the channels passed in.
|
static void |
updateCacheForChannelsAsync(java.util.Set<Channel> channelsToUpdate)
Asynchronusly updates the errata caches for the channels passed in.
|
static void |
updateErrataAndPackageCacheForChannel(java.lang.Long cid)
Clear out and re-generate the entries in rhnServerNeededPackageCache and
rhnServerNeededErrataCache tables by channel.
|
addConfigurator, blobToByteArray, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, createSessionFactory, executeCallableMode, executeSelectMode, getBlobContents, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, listObjectsByNamedQuery, lockObject, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToByteArray
protected org.apache.log4j.Logger getLogger()
getLogger
in class HibernateFactory
public static int countServersInQueue(Org org)
org
- Org whose server count is sought.public static int deleteErrataCacheQueue(Org org)
org
- Org whose errata cache queue should be emptied.public static DataResult allServerIdsForOrg(Org org)
org
- Orgpublic static DataResult packagesNeedingUpdates(java.lang.Long sid)
sid
- Server Id.public static int deleteNeededPackageCache(java.lang.Long sid, java.lang.Long errataId, java.lang.Long packageId)
sid
- Server IderrataId
- Errata IdpackageId
- Package Idpublic static int deleteNeededPackageCache(java.lang.Long sid)
sid
- Server Idpublic static int insertNeededErrataCache(java.lang.Long sid, java.lang.Long eid, java.lang.Long pid)
sid
- Server Ideid
- Errata Idpid
- Package Idpublic static int deleteNeededErrataCache(java.lang.Long sid, java.lang.Long eid)
sid
- Server Ideid
- Errata Idpublic static int deleteNeededErrataCache(java.lang.Long sid)
sid
- Server Idpublic static void updateCacheForChannelsAsync(java.util.List<java.lang.Long> channelIdsToUpdate)
channelIdsToUpdate
- - channel IDs (Long) that need their errata
caches updatedpublic static void updateCacheForChannelsAsync(java.util.Set<Channel> channelsToUpdate)
channelsToUpdate
- - Channels that need their errata caches updatedpublic static void insertCacheForChannelErrataAsync(java.util.List<java.lang.Long> channelIdsToUpdate, Errata errata)
channelIdsToUpdate
- - channel IDs (Long) that need their errata
caches updatederrata
- the errata to update the cache forpublic static void insertCacheForChannelErrataAsync(java.util.List<java.lang.Long> channelIdsToUpdate, java.lang.Long errataId)
channelIdsToUpdate
- - channel IDs (Long) that need their errata
caches updatederrataId
- the errata to update the cache forpublic static void insertCacheForChannelErrata(java.util.List<java.lang.Long> channelIdsToUpdate, Errata errata)
channelIdsToUpdate
- - channel IDs (Long) that need their errata
caches updatederrata
- the errata to update the cache forpublic static void insertCacheForChannelPackagesAsync(java.util.List<java.lang.Long> channelIdsToUpdate, java.util.List<java.lang.Long> packageIds)
channelIdsToUpdate
- - channel IDs (Long) that need their errata
caches updatedpackageIds
- list of package ids to insert cache entries forpublic static void insertCacheForChannelPackages(java.lang.Long cid, java.lang.Long eid, java.util.List<java.lang.Long> pids)
cid
- the channel where packages were added toeid
- the errata that 'pushed' these packages (can be nullpids
- the list of pids that were pushed.public static void deleteCacheEntriesForChannelErrata(java.lang.Long cid, java.util.List<java.lang.Long> eids)
cid
- the channel that the systems belong toeids
- the errata to removepublic static void deleteCacheEntriesForErrataPackages(java.lang.Long eid, java.util.List<java.lang.Long> pids)
eid
- the errata to removepids
- the packages to removepublic static void updateErrataAndPackageCacheForChannel(java.lang.Long cid)
cid
- - channel to update caches for.public static void deleteCacheEntriesForChannelPackages(java.lang.Long cid, java.util.List<java.lang.Long> pids)
cid
- the channel idpids
- the package ids