Class SnapshotGarbageCollectionService
java.lang.Object
com.e1c.g5.v8.dt.internal.snapshot.integration.git.SnapshotGarbageCollectionService
- All Implemented Interfaces:
IManagedService
Removes snapshots when they become unnecessary. This happens in three cases:
- There are not branches pointing to the associated commit left.
- The project for which the snapshot was created is deleted.
- The removal is triggered externally with
#removeNeedlessSnapshots(BiPredicate)
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
void
void
removeNeedlessSnapshots
(String reason, BiPredicate<org.eclipse.core.resources.IProject, org.eclipse.jgit.lib.ObjectId> shallKeepSnapshot) Schedules removing of needless snapshots according to the given predicate.
-
Constructor Details
-
SnapshotGarbageCollectionService
public SnapshotGarbageCollectionService()
-
-
Method Details
-
activate
public void activate()- Specified by:
activate
in interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfaceIManagedService
-
removeNeedlessSnapshots
public void removeNeedlessSnapshots(String reason, BiPredicate<org.eclipse.core.resources.IProject, org.eclipse.jgit.lib.ObjectId> shallKeepSnapshot) Schedules removing of needless snapshots according to the given predicate.- Parameters:
shallKeepSnapshot
- the predicate to test if a snapshot shall be kept, cannot benull
-