com.gridsystems.storage
Interface FailSafe


public interface FailSafe

This interface gives file backup services.

Version:
1.0

Method Summary
 java.lang.String[] getFileNameList()
          It returns all the files that will be safe saved.
 void load(java.lang.String[] fileNames)
          Loads information of the class contained in the files.
 void recoverFromLoadError(java.lang.Exception error)
          Error treatment of the load method.
 void recoverFromStoreError(java.lang.Exception error)
          Error treatment of the store method.
 void store(java.lang.String[] fileNames)
          It stores the information of the class in that files.
 

Method Detail

getFileNameList

java.lang.String[] getFileNameList()
It returns all the files that will be safe saved.

Returns:
a list of files.

store

void store(java.lang.String[] fileNames)
           throws java.lang.Exception
It stores the information of the class in that files.

IMPORTANT: This method MUST be synchronized.

Parameters:
fileNames - List of files to store the class information
Throws:
java.lang.Exception - if the files cannot be stored correctly.

recoverFromStoreError

void recoverFromStoreError(java.lang.Exception error)
                           throws java.lang.Exception
Error treatment of the store method.

IMPORTANT: This method MUST be synchronized.

Parameters:
error - Error thrown by store method.
Throws:
java.lang.Exception - if error cannot be handled

load

void load(java.lang.String[] fileNames)
          throws java.lang.Exception
Loads information of the class contained in the files.

IMPORTANT: This method MUST be synchronized.

Parameters:
fileNames - List of files to store the class information
Throws:
java.lang.Exception - if the files cannot be loaded correctly.

recoverFromLoadError

void recoverFromLoadError(java.lang.Exception error)
                          throws java.lang.Exception
Error treatment of the load method.

IMPORTANT: This method MUST be synchronized.

Parameters:
error - Error throwed by load method.
Throws:
java.lang.Exception - if error cannot be handled


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.