org.jboss.system.server.profileservice.repository.clustered.local.file
Class FileWriteAction

java.lang.Object
  extended by org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationAction<T>
      extended by org.jboss.system.server.profileservice.repository.clustered.sync.AbstractContentMetadataMutatorAction<FileBasedSynchronizationActionContext>
          extended by org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractLocalContentChangeAction
              extended by org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractFileWriteAction
                  extended by org.jboss.system.server.profileservice.repository.clustered.local.file.FileWriteAction
All Implemented Interfaces:
SynchronizationAction<FileBasedSynchronizationActionContext>, SynchronizationWriteAction<FileBasedSynchronizationActionContext>, TwoPhaseCommitAction<FileBasedSynchronizationActionContext>

public class FileWriteAction
extends AbstractFileWriteAction
implements SynchronizationWriteAction<FileBasedSynchronizationActionContext>

SynchronizationWriteAction that writes to a File.

Version:
$Revision: $
Author:
Brian Stansberry

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.system.server.profileservice.repository.clustered.sync.AbstractSynchronizationAction
AbstractSynchronizationAction.State
 
Constructor Summary
FileWriteAction(File targetFile, FileBasedSynchronizationActionContext context, ContentModification modification)
          Create a new FileWriteAction.
 
Method Summary
protected  org.jboss.logging.Logger getLogger()
           
 void writeBytes(ByteChunk bytes)
          Write the given bytes to the item referenced by this action.
 
Methods inherited from class org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractFileWriteAction
doComplete, modifyTarget, safeCleanup
 
Methods inherited from class org.jboss.system.server.profileservice.repository.clustered.local.file.AbstractLocalContentChangeAction
createTempFile, doCancel, doCommit, doPrepare, doRollbackFromCancelled, doRollbackFromComplete, doRollbackFromOpen, doRollbackFromPrepared, doRollbackFromRollbackOnly, getTargetFile, safeCleanup
 
Methods inherited from class org.jboss.system.server.profileservice.repository.clustered.sync.AbstractContentMetadataMutatorAction
rollbackContentMetadata, updateContentMetadata
 
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
 
Methods inherited from interface org.jboss.system.server.profileservice.repository.clustered.sync.SynchronizationAction
cancel, complete, getContext, getRepositoryContentModification, isCancelled, isComplete
 

Constructor Detail

FileWriteAction

public FileWriteAction(File targetFile,
                       FileBasedSynchronizationActionContext context,
                       ContentModification modification)
Create a new FileWriteAction.

Parameters:
targetFile - the file to write to
context - the overall context of the modification
modification - the modification
Method Detail

writeBytes

public void writeBytes(ByteChunk bytes)
                throws IOException
Description copied from interface: SynchronizationWriteAction
Write the given bytes to the item referenced by this action.

Specified by:
writeBytes in interface SynchronizationWriteAction<FileBasedSynchronizationActionContext>
Overrides:
writeBytes in class AbstractFileWriteAction
Parameters:
bytes - the bytes. Cannot be null. The byte count must be greater than -1.
Throws:
IOException

getLogger

protected org.jboss.logging.Logger getLogger()
Specified by:
getLogger in class AbstractLocalContentChangeAction


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