Class DeleteUnreferencedBinariesBatchJob

java.lang.Object
ch.tocco.nice2.tasks.api.quartz.AbstractJob
ch.tocco.nice2.dms.impl.maintenance.DeleteUnreferencedBinariesBatchJob
All Implemented Interfaces:
org.quartz.Job

@DisallowConcurrentExecution public class DeleteUnreferencedBinariesBatchJob extends AbstractJob
DeleteUnreferencedBinariesBatchJob does find and delete entries on the _nice_binary table which are not referenced by any other entry on the database anymore. Finding and deleting the unreferenced binaries is achieved by a reference counter on the _nice_binary table. The counter is updated by db triggers which are created by the BinaryFkFragment for all tables and columns referencing the _nice_binary table. Unfortunately this is the only way to this in a fast and memory-efficient way.