com.openexchange.admin.tools
Class FilestoreDataMover

java.lang.Object
  extended by com.openexchange.admin.tools.FilestoreDataMover
All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Void>

public class FilestoreDataMover
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Void>

Author:
d7

Constructor Summary
FilestoreDataMover(java.lang.String src, java.lang.String dst, com.openexchange.admin.rmi.dataobjects.Context ctx, com.openexchange.admin.rmi.dataobjects.Filestore dstStore)
           
 
Method Summary
 java.lang.Void call()
          starting the thread
 void copy()
          start the copy (rsync)
 java.util.ArrayList<java.lang.String> getFileList(java.lang.String source)
          get the list of files to copy from the source dir
 long getSize(java.lang.String source)
          get Size as long (bytes) from the source dir
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilestoreDataMover

public FilestoreDataMover(java.lang.String src,
                          java.lang.String dst,
                          com.openexchange.admin.rmi.dataobjects.Context ctx,
                          com.openexchange.admin.rmi.dataobjects.Filestore dstStore)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getSize

public long getSize(java.lang.String source)
get Size as long (bytes) from the source dir

Parameters:
source -
Returns:

getFileList

public java.util.ArrayList<java.lang.String> getFileList(java.lang.String source)
get the list of files to copy from the source dir

Parameters:
source -
Returns:

copy

public void copy()
          throws com.openexchange.admin.rmi.exceptions.StorageException,
                 java.io.IOException,
                 java.lang.InterruptedException,
                 com.openexchange.admin.rmi.exceptions.ProgrammErrorException
start the copy (rsync)

Throws:
com.openexchange.admin.rmi.exceptions.StorageException
java.lang.InterruptedException
java.io.IOException
com.openexchange.admin.rmi.exceptions.ProgrammErrorException

call

public java.lang.Void call()
                    throws com.openexchange.admin.rmi.exceptions.StorageException,
                           java.io.IOException,
                           java.lang.InterruptedException,
                           com.openexchange.admin.rmi.exceptions.ProgrammErrorException
starting the thread

Specified by:
call in interface java.util.concurrent.Callable<java.lang.Void>
Throws:
com.openexchange.admin.rmi.exceptions.StorageException
java.lang.InterruptedException
java.io.IOException
com.openexchange.admin.rmi.exceptions.ProgrammErrorException