mirrormap.commands
Class UpdateCommand
java.lang.Object
mirrormap.commands.AbstractCommand
mirrormap.commands.AddCommand
mirrormap.commands.UpdateCommand
- All Implemented Interfaces:
- Serializable, ICommand
public final class UpdateCommand
- extends AddCommand
Encapsulates a command to put a key-value entry into a MirrorMap
.
- Author:
- Ramon Servadei
- See Also:
- Serialized Form
UpdateCommand
public UpdateCommand()
UpdateCommand
public UpdateCommand(String mirrorMapName,
Serializable key,
Serializable value)
shouldExecute
protected boolean shouldExecute(MirrorMap<Serializable,Serializable> mirrorMap)
- Description copied from class:
AddCommand
- Determines whether the command should be executed. This exists to prevent
the source of a change from re-applying it when it receives the same
change back from the mirror map server (all peers receive the same
change, even the originating one)
- Overrides:
shouldExecute
in class AddCommand
- Parameters:
mirrorMap
- the mirror map affected
- Returns:
true
if this command should be executed
Copyright © 2010. All Rights Reserved.