public void rollback() throws BackupException
   {
      try
      {
         SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Void>()
         {
            public Void run() throws IOException
            {
               for (int i = 0; i < tmpDirs.size(); i++)
               {
                  File tmpDir = tmpDirs.get(i);
                  File dataDir = dataDirs.get(i);

                  if (dataDir.exists())
                  {
                     DirectoryHelper.removeDirectory(dataDir);
                  }

                  DirectoryHelper.copyDirectory(tmpDir, dataDir);
               }

               return null;
            }
         });
      }
      catch (IOException e)
      {
         throw new BackupException(e);
      }
   }
public void rollback ( ) throws BackupException { try { SecurityHelper . doPrivilegedIOExceptionAction ( new PrivilegedExceptionAction < Void > ( ) { public Void run ( ) throws IOException { for ( int i = 0 ; i < tmpDirs . size ( ) ; i ++ ) { File tmpDir = tmpDirs . get ( i ) ; File dataDir = dataDirs . get ( i ) ; if ( dataDir . exists ( ) ) { DirectoryHelper . removeDirectory ( dataDir ) ; } DirectoryHelper . copyDirectory ( tmpDir , dataDir ) ; } return null ; } } ) ; } catch ( IOException e ) { throw new BackupException ( e ) ; } }
{@inheritDoc}