org.jboss.system.server.profileservice.repository.clustered.local.file
Class AbstractLocalContentChangeAction
java.lang.Object
org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationAction<T>
org.jboss.system.server.profileservice.repository.clustered.sync.AbstractContentMetadataMutatorAction<FileBasedSynchronizationActionContext>
org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractLocalContentChangeAction
- All Implemented Interfaces:
- SynchronizationAction<FileBasedSynchronizationActionContext>, TwoPhaseCommitAction<FileBasedSynchronizationActionContext>
- Direct Known Subclasses:
- AbstractFileWriteAction, InitiateRmdirAction, MkDirAction, RemoveFileAction
public abstract class AbstractLocalContentChangeAction
- extends AbstractContentMetadataMutatorAction<FileBasedSynchronizationActionContext>
Methods inherited from class org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationAction |
cancel, commit, complete, getContext, getMarkedRemovedItem, getRepositoryContentModification, getState, isCancelled, isComplete, prepare, rollback |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLocalContentChangeAction
protected AbstractLocalContentChangeAction(File targetFile,
FileBasedSynchronizationActionContext context,
ContentModification modification)
- Create a new AbstractLocalContentChangeAction.
- Parameters:
targetFile
- the file whose content is to be changedcontext
- the overall context of the modificationmodification
- the modification
getLogger
protected abstract org.jboss.logging.Logger getLogger()
modifyTarget
protected abstract boolean modifyTarget()
throws IOException
- Throws:
IOException
getTargetFile
protected File getTargetFile()
doCancel
protected void doCancel()
- Specified by:
doCancel
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doComplete
protected void doComplete()
throws Exception
- Specified by:
doComplete
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
- Throws:
Exception
doPrepare
protected boolean doPrepare()
- Specified by:
doPrepare
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doRollbackFromCancelled
protected void doRollbackFromCancelled()
- Specified by:
doRollbackFromCancelled
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doRollbackFromComplete
protected void doRollbackFromComplete()
- Specified by:
doRollbackFromComplete
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doRollbackFromOpen
protected void doRollbackFromOpen()
- Specified by:
doRollbackFromOpen
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doRollbackFromPrepared
protected void doRollbackFromPrepared()
- Specified by:
doRollbackFromPrepared
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doRollbackFromRollbackOnly
protected void doRollbackFromRollbackOnly()
- Specified by:
doRollbackFromRollbackOnly
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
doCommit
protected void doCommit()
- Specified by:
doCommit
in class AbstractSynchronizationAction<FileBasedSynchronizationActionContext>
createTempFile
protected File createTempFile()
throws IOException
- Throws:
IOException
safeCleanup
protected void safeCleanup(boolean cleanRollback)
safeCleanup
protected void safeCleanup()
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.