org.alfresco.filesys.alfresco
Class ShuffleCacheImpl

java.lang.Object
  extended by org.alfresco.filesys.alfresco.ShuffleCacheImpl
All Implemented Interfaces:
ShuffleCache

public class ShuffleCacheImpl
extends java.lang.Object
implements ShuffleCache

Cache for alfresco "CIFS shuffles"


Constructor Summary
ShuffleCacheImpl()
           
 
Method Summary
 void createTemporaryFile(java.lang.String path)
          Add a new temporary file to the "shuffle cache".
 boolean isCaseSensitive()
           
 boolean isCreated(java.lang.String path)
          Has the path been "soft created"
 boolean isDeleted(java.lang.String path)
          Has the path been "soft deleted"
 boolean isShuffleDirectory(java.lang.String dir)
          Does the specified directory contain a shuffled temporary file
 void renameTemporaryFile(java.lang.String oldPath, java.lang.String newPath)
          Takes the contents of a temporary file and applies it to the new path.
 void setCaseSensitive(boolean caseSensitive)
           
 void softDelete(java.lang.String path)
          Soft delete a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShuffleCacheImpl

public ShuffleCacheImpl()
Method Detail

createTemporaryFile

public void createTemporaryFile(java.lang.String path)
Description copied from interface: ShuffleCache
Add a new temporary file to the "shuffle cache". Content is not persisted in the alfresco repo until either a rename occurs or after a time delay.

Specified by:
createTemporaryFile in interface ShuffleCache

softDelete

public void softDelete(java.lang.String path)
Description copied from interface: ShuffleCache
Soft delete a file. The file may be re-instated later or the delete made permenant after a time delay.

Specified by:
softDelete in interface ShuffleCache

renameTemporaryFile

public void renameTemporaryFile(java.lang.String oldPath,
                                java.lang.String newPath)
Description copied from interface: ShuffleCache
Takes the contents of a temporary file and applies it to the new path.

If the new path has been soft deleted then the soft delete is removed.

After the contents of the temporary file have been written the it may may be made available for garbage collection.

Specified by:
renameTemporaryFile in interface ShuffleCache
Parameters:
oldPath - the location of the temporaryFile
newPath - the location of the new file.

isShuffleDirectory

public boolean isShuffleDirectory(java.lang.String dir)
Description copied from interface: ShuffleCache
Does the specified directory contain a shuffled temporary file

Specified by:
isShuffleDirectory in interface ShuffleCache
Returns:

isDeleted

public boolean isDeleted(java.lang.String path)
Description copied from interface: ShuffleCache
Has the path been "soft deleted"

Specified by:
isDeleted in interface ShuffleCache

isCreated

public boolean isCreated(java.lang.String path)
Description copied from interface: ShuffleCache
Has the path been "soft created"

Specified by:
isCreated in interface ShuffleCache
Returns:

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)

isCaseSensitive

public boolean isCaseSensitive()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.