Class SnapshotManagerImpl
- java.lang.Object
-
- org.duracloud.snapshot.service.impl.SnapshotManagerImpl
-
- All Implemented Interfaces:
SnapshotManager
@Component public class SnapshotManagerImpl extends java.lang.Object implements SnapshotManager
- Author:
- Daniel Bernstein Date: Jul 31, 2014
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_DAYS_IN_CLEANUPprotected static java.lang.String[]METADATA_FILENAMES
-
Constructor Summary
Constructors Constructor Description SnapshotManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnapshotaddAlternateSnapshotIds(Snapshot snapshot, java.util.List<java.lang.String> alternateIds)voidaddContentItem(Snapshot snapshot, java.lang.String contentId, java.util.Map<java.lang.String,java.lang.String> props)voiddeleteSnapshot(java.lang.String snapshotId)voidfinalizeSnapshots()protected voidsetBridgeConfig(BridgeConfiguration bridgeConfig)protected voidsetEventLog(EventLog eventLog)For testing purposes onlyprotected voidsetNotificationManager(org.duracloud.common.notification.NotificationManager notificationManager)For testing purposes onlyvoidsetSecondsBetweenCleanupFailureNotifications(long secondsBetweenCleanupFailureNotifications)protected voidsetSnapshotContentItemRepo(SnapshotContentItemRepo snapshotContentItemRepo)For testing purposes onlyprotected voidsetSnapshotRepo(SnapshotRepo snapshotRepo)For testing purposes onlyprotected voidsetSnapshotTaskClientHelper(SnapshotTaskClientHelper snapshotTaskClientHelper)For testing purposes onlyvoidsetStoreClientHelper(StoreClientHelper storeClientHelper)SnapshottransferError(java.lang.String snapshotId, java.lang.String errorDetails)SnapshottransferToStorageComplete(java.lang.String snapshotId)SnapshotupdateHistory(Snapshot snapshot, java.lang.String history)
-
-
-
Field Detail
-
MAX_DAYS_IN_CLEANUP
public static final int MAX_DAYS_IN_CLEANUP
- See Also:
- Constant Field Values
-
METADATA_FILENAMES
protected static java.lang.String[] METADATA_FILENAMES
-
-
Method Detail
-
setSnapshotContentItemRepo
protected void setSnapshotContentItemRepo(SnapshotContentItemRepo snapshotContentItemRepo)
For testing purposes only- Parameters:
snapshotContentItemRepo- the snapshotContentItemRepo to set
-
setSnapshotRepo
protected void setSnapshotRepo(SnapshotRepo snapshotRepo)
For testing purposes only- Parameters:
snapshotRepo- the snapshotRepo to set
-
setNotificationManager
protected void setNotificationManager(org.duracloud.common.notification.NotificationManager notificationManager)
For testing purposes only- Parameters:
notificationManager- the notificationManager to set
-
setSnapshotTaskClientHelper
protected void setSnapshotTaskClientHelper(SnapshotTaskClientHelper snapshotTaskClientHelper)
For testing purposes only- Parameters:
snapshotTaskClientHelper- the snapshotTaskClientHelper to set
-
setBridgeConfig
protected void setBridgeConfig(BridgeConfiguration bridgeConfig)
- Parameters:
bridgeConfig- the bridgeConfig to set
-
setEventLog
protected void setEventLog(EventLog eventLog)
For testing purposes only- Parameters:
eventLog- the event log
-
addContentItem
@Transactional public void addContentItem(Snapshot snapshot, java.lang.String contentId, java.util.Map<java.lang.String,java.lang.String> props) throws SnapshotException
- Specified by:
addContentItemin interfaceSnapshotManager- Throws:
SnapshotException
-
addAlternateSnapshotIds
@Transactional public Snapshot addAlternateSnapshotIds(Snapshot snapshot, java.util.List<java.lang.String> alternateIds) throws AlternateIdAlreadyExistsException
- Specified by:
addAlternateSnapshotIdsin interfaceSnapshotManager- Throws:
AlternateIdAlreadyExistsException
-
transferToStorageComplete
@Transactional public Snapshot transferToStorageComplete(java.lang.String snapshotId) throws SnapshotException
- Specified by:
transferToStorageCompletein interfaceSnapshotManager- Throws:
SnapshotException
-
transferError
@Transactional public Snapshot transferError(java.lang.String snapshotId, java.lang.String errorDetails) throws SnapshotException
- Specified by:
transferErrorin interfaceSnapshotManager- Throws:
SnapshotException
-
finalizeSnapshots
@Transactional public void finalizeSnapshots()
- Specified by:
finalizeSnapshotsin interfaceSnapshotManager
-
updateHistory
@Transactional public Snapshot updateHistory(Snapshot snapshot, java.lang.String history)
- Specified by:
updateHistoryin interfaceSnapshotManager
-
setStoreClientHelper
public void setStoreClientHelper(StoreClientHelper storeClientHelper)
- Parameters:
storeClientHelper- the storeClientHelper to set
-
deleteSnapshot
@Transactional public void deleteSnapshot(java.lang.String snapshotId)
- Specified by:
deleteSnapshotin interfaceSnapshotManager
-
setSecondsBetweenCleanupFailureNotifications
public void setSecondsBetweenCleanupFailureNotifications(long secondsBetweenCleanupFailureNotifications)
- Parameters:
secondsBetweenCleanupFailureNotifications- the secondsBetweenCleanupFailureNotifications to set
-
-