org.entityfs.util.dirdiff
Class DeleteUnmatchedTargetEntityStrategy
java.lang.Object
org.entityfs.util.dirdiff.DeleteUnmatchedTargetEntityStrategy
- All Implemented Interfaces:
- UnmatchedTargetEntityStrategy
public class DeleteUnmatchedTargetEntityStrategy
- extends Object
- implements UnmatchedTargetEntityStrategy
This UnmatchedTargetEntityStrategy
deletes unmatched target entities.
If the unmatched target entity is a directory, the entire directory hierarchy
is deleted.
Since objects of this class contains no mutable internal state, the singleton
instance INSTANCE
may be used instead of instantiating this class.
- Since:
- 1.0
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final DeleteUnmatchedTargetEntityStrategy INSTANCE
DeleteUnmatchedTargetEntityStrategy
public DeleteUnmatchedTargetEntityStrategy()
handle
public void handle(EntityView ev,
DirectoryView master,
DirectoryView target)
- Description copied from interface:
UnmatchedTargetEntityStrategy
- Handle an entity in the target directory that did not have a matching
entity in the master directory.
- Specified by:
handle
in interface UnmatchedTargetEntityStrategy
- Parameters:
ev
- The entity without match.master
- The master directory. Locked for reading. (This method
should not release the lock.)target
- The target directory. Locked for writing. (This method
should not release the lock.)