com.sun.enterprise.deploy.shared
Class FileArchive.StaleFileManager.Util

java.lang.Object
  extended by com.sun.enterprise.deploy.shared.FileArchive.StaleFileManager.Util
Enclosing interface:
FileArchive.StaleFileManager

public static class FileArchive.StaleFileManager.Util
extends Object


Constructor Summary
FileArchive.StaleFileManager.Util()
           
 
Method Summary
static FileArchive.StaleFileManager getInstance(File archive)
          Factory method for a StaleFileManager.
static void markDeletedArchive(Archive archive)
          Creates a marker file in the archive directory - if it still exists and contains any stale files.
static void markDeletedArchive(File archiveFile)
          Creates a marker file in the archive directory - if it still exists and contains any stale files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileArchive.StaleFileManager.Util

public FileArchive.StaleFileManager.Util()
Method Detail

markDeletedArchive

public static void markDeletedArchive(Archive archive)
Creates a marker file in the archive directory - if it still exists and contains any stale files.

Parameters:
archive - the File for the archive to mark

markDeletedArchive

public static void markDeletedArchive(File archiveFile)
Creates a marker file in the archive directory - if it still exists and contains any stale files.

Parameters:
archive - the File for the archive to mark

getInstance

public static FileArchive.StaleFileManager getInstance(File archive)
                                                throws IOException
Factory method for a StaleFileManager.

Callers should invoke this method only after they have finished with the FileArchive and have tried to delete it. If the directory for the archive remains then it contains one or more stale files that could not be deleted, and the factory method returns a instance that tracks the stale files. If the directory no longer exists then the delete succeeded, there are

Parameters:
archive - the directory to contain the archive
Returns:
StaleFileManager for the FileArchive to use
Throws:
IOException


Copyright © 2012. All Rights Reserved.