org.entityfs.lock.cmd
Interface LockCommand

All Known Implementing Classes:
AbstractLockCommand, LockForReadingCommand, LockForWritingCommand, LockParentForReadingCommand, LockParentForWritingCommand

public interface LockCommand

This is a marker interface for a lock command, such as "lock this entity's parent directory". Lock commands are used together with an LockCommandExecutor to lock a collection of locks in an order that is compliant with a locking strategy.

Lock command implementations are required to implement the equals and hashCode methods so that one lock command instance of a certain type for a specific entity is equal to another instance of the same lock command type for the same entity.

Lock command implementations are required to be immutable.

Since:
1.0
Author:
Karl Gustafsson
See Also:
LockCommandExecutor
In_jar:
entityfs-core

Method Summary
 ReadWriteLockable getLockable()
          Get the lockable object that this lock command is for.
 

Method Detail

getLockable

ReadWriteLockable getLockable()
Get the lockable object that this lock command is for.

Returns:
The lock command's lockable object.