Class ChunkCleanUpTask

java.lang.Object
org.apache.sling.servlets.post.impl.helper.ChunkCleanUpTask
All Implemented Interfaces:
Runnable

public class ChunkCleanUpTask extends Object implements Runnable
The ChunkCleanUpTask implements a job run at regular intervals to find incomplete chunk uploads and remove them from the repository to prevent littering the repository with incomplete chunks.

This task is configured with OSGi configuration for the PID org.apache.sling.servlets.post.impl.helper.ChunkCleanUpTask with property scheduler.expression being the schedule to execute the task. The schedule is a cron job expression as described at Cron Trigger with the default value configured to run twice a day at 0h41m31s and 12h4131s.

The property chunk.cleanup.age specifies chunk's age in minutes before it is considered for clean up.

Currently the cleanup tasks connects as the administrative user to the default workspace assuming users are stored in that workspace and the administrative user has full access.

  • Constructor Details

    • ChunkCleanUpTask

      public ChunkCleanUpTask()
  • Method Details

    • run

      public void run()
      Executes the job. Is called for each triggered schedule point.
      Specified by:
      run in interface Runnable
    • activate

      protected void activate(ChunkCleanUpTask.Config configuration)