org.duracloud.services.duplication.impl
Class SpaceDuplicatorReportingImpl

java.lang.Object
  extended by org.duracloud.services.duplication.impl.SpaceDuplicatorReportingImpl
All Implemented Interfaces:
SpaceDuplicator

public class SpaceDuplicatorReportingImpl
extends Object
implements SpaceDuplicator

This class implements the SpaceDuplicator contract with the responsibility of requeuing failed duplication attempts and reporting all successful and failed duplications.

Author:
Andrew Woods Date: 9/14/11

Field Summary
static int MAX_RETRIES
           
 
Constructor Summary
SpaceDuplicatorReportingImpl(SpaceDuplicator spaceDuplicator, ResultListener listener)
           
SpaceDuplicatorReportingImpl(SpaceDuplicator spaceDuplicator, ResultListener listener, long waitMillis)
           
 
Method Summary
 void createSpace(String spaceId)
          This method creates a newly duplicated space with the arg spaceId.
 void deleteSpace(String spaceId)
          This method deletes the duplicated space with arg spaceId.
protected  boolean retriesExist()
          This method is intended as a helper for UNIT TESTS ONLY.
 void stop()
          This method performs any necessary clean-up of the SpaceDuplicator.
 void updateSpace(String spaceId)
          This method updates the duplicated space with arg spaceId.
 void updateSpaceAcl(String spaceId)
          This method updates the duplicated space ACL with arg spaceId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_RETRIES

public static final int MAX_RETRIES
See Also:
Constant Field Values
Constructor Detail

SpaceDuplicatorReportingImpl

public SpaceDuplicatorReportingImpl(SpaceDuplicator spaceDuplicator,
                                    ResultListener listener)

SpaceDuplicatorReportingImpl

public SpaceDuplicatorReportingImpl(SpaceDuplicator spaceDuplicator,
                                    ResultListener listener,
                                    long waitMillis)
Method Detail

createSpace

public void createSpace(String spaceId)
Description copied from interface: SpaceDuplicator
This method creates a newly duplicated space with the arg spaceId.

Specified by:
createSpace in interface SpaceDuplicator
Parameters:
spaceId - of duplicated space

updateSpace

public void updateSpace(String spaceId)
Description copied from interface: SpaceDuplicator
This method updates the duplicated space with arg spaceId.

Specified by:
updateSpace in interface SpaceDuplicator
Parameters:
spaceId - of space to update

updateSpaceAcl

public void updateSpaceAcl(String spaceId)
Description copied from interface: SpaceDuplicator
This method updates the duplicated space ACL with arg spaceId.

Specified by:
updateSpaceAcl in interface SpaceDuplicator
Parameters:
spaceId - of space to update

deleteSpace

public void deleteSpace(String spaceId)
Description copied from interface: SpaceDuplicator
This method deletes the duplicated space with arg spaceId.

Specified by:
deleteSpace in interface SpaceDuplicator
Parameters:
spaceId - of space to delete

stop

public void stop()
Description copied from interface: SpaceDuplicator
This method performs any necessary clean-up of the SpaceDuplicator.

Specified by:
stop in interface SpaceDuplicator

retriesExist

protected boolean retriesExist()
This method is intended as a helper for UNIT TESTS ONLY.

Returns:
true if retries are in-progress


Copyright © 2009-2012 DuraSpace. All Rights Reserved.