org.jboss.system.server.profileservice.repository.clustered.sync
Interface SynchronizationAction<T extends SynchronizationActionContext>

All Known Subinterfaces:
SynchronizationInitiationAction<T>, SynchronizationReadAction<T>, SynchronizationRemoteAction<T>, SynchronizationWriteAction<T>, TwoPhaseCommitAction<T>
All Known Implementing Classes:
AbstractContentMetadataMutatorAction, AbstractFileWriteAction, AbstractLocalContentChangeAction, AbstractSynchronizationAction, AddContentStreamAction, DirectoryTimestampUpdateAction, FileReadAction, FileWriteAction, InitiateRmdirAction, MkDirAction, NoOpRepositorySynchronizationWriteAction, NoOpSynchronizationAction, RemoteRemovalAction, RemovalMetadataInsertionAction, RemoveFileAction, SimpleSynchronizationRemoteAction

public interface SynchronizationAction<T extends SynchronizationActionContext>

Encapsulates a single action needed to help synchronize the contents of one node's repository with the rest of the cluster.

Version:
$Revision: $
Author:
Brian Stansberry

Method Summary
 void cancel()
          Cancel the action.
 void complete()
          Execute the action and if successful mark it as complete.
 T getContext()
          Gets the contextual information for the set of actions of which this object is a member.
 ContentModification getRepositoryContentModification()
          Gets the metadata describing this action.
 boolean isCancelled()
          Gets whether complete() has been invoked.
 boolean isComplete()
          Gets whether complete() has been invoked.
 

Method Detail

getContext

T getContext()
Gets the contextual information for the set of actions of which this object is a member.

Returns:
the context. Will not be null

getRepositoryContentModification

ContentModification getRepositoryContentModification()
Gets the metadata describing this action.

Returns:
the metadata. Will not be null

cancel

void cancel()
Cancel the action.


complete

void complete()
Execute the action and if successful mark it as complete.


isComplete

boolean isComplete()
Gets whether complete() has been invoked.

Returns:
true if complete() has been invoked

isCancelled

boolean isCancelled()
Gets whether complete() has been invoked.

Returns:
true if complete() has been invoked


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.