org.jboss.system.server.profileservice.repository.clustered.local.file
Class AbstractFileWriteAction
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
org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractFileWriteAction
- All Implemented Interfaces:
- SynchronizationAction<FileBasedSynchronizationActionContext>, TwoPhaseCommitAction<FileBasedSynchronizationActionContext>
- Direct Known Subclasses:
- AddContentStreamAction, FileWriteAction
public abstract class AbstractFileWriteAction
- extends AbstractLocalContentChangeAction
Base class for actions that write to a File
.
- Version:
- $Revision: $
- Author:
- Brian Stansberry
Methods inherited from class org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractLocalContentChangeAction |
createTempFile, doCancel, doCommit, doPrepare, doRollbackFromCancelled, doRollbackFromComplete, doRollbackFromOpen, doRollbackFromPrepared, doRollbackFromRollbackOnly, getLogger, getTargetFile, safeCleanup |
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 |
AbstractFileWriteAction
public AbstractFileWriteAction(File targetFile,
FileBasedSynchronizationActionContext context,
ContentModification modification)
- Create a new FileWriteAction.
- Parameters:
targetFile
- the file to write tocontext
- the overall context of the modificationmodification
- the modification
writeBytes
protected void writeBytes(ByteChunk bytes)
throws IOException
- Throws:
IOException
doComplete
protected void doComplete()
throws Exception
- Overrides:
doComplete
in class AbstractLocalContentChangeAction
- Throws:
Exception
modifyTarget
protected boolean modifyTarget()
throws IOException
- Specified by:
modifyTarget
in class AbstractLocalContentChangeAction
- Throws:
IOException
safeCleanup
protected void safeCleanup(boolean cleanRollback)
- Overrides:
safeCleanup
in class AbstractLocalContentChangeAction
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.