Interface DataCleaner

All Superinterfaces:
ServerExtension, TeamCityExtension

public interface DataCleaner
extends ServerExtension

If a plugin has some data associated with a build that should be deleted when build is deleted by cleanup process it should implement this interface and register it as server extension with help of ExtensionHolder.registerExtension(Class, String, jetbrains.buildServer.TeamCityExtension) method.

Eugene Zhuravlev Date: May 3, 2006

Method Summary
 void performCleanup(java.sql.Connection connection, long buildId, CleanupLevel cleanupLevel)
          Invoked for each build which is to be cleaned up.

Method Detail


void performCleanup(java.sql.Connection connection,
                    long buildId,
                    CleanupLevel cleanupLevel)
                    throws java.sql.SQLException
Invoked for each build which is to be cleaned up. At this point data this build_id may be partially deleted, but history entry and test info still exists. Note: DataCleaner is invoked when cleanup is proceeding and it should perform db operations in current thread otherwise deadlock will occur.

connection - connection to work on
buildId - Id of build which data beeng cleaned
cleanupLevel - specifies what data should be cleaned
java.sql.SQLException - on database error, it will be logged only.