double version = ExportData.getVersion(exportContextBytes);
if (getPersistenceManager().supports(type, version))
{
String refId = getPersistenceManager().getExportReferenceId(type, version, ExportData.getInternalBytes(exportContextBytes));
ExportContext exportContext = getPersistenceManager().getExportContext(refId);
if (exportContext.isExportByValue())
{
throw new OperationFailedException("Cannot set the lifetime for an export that was exported by value.");
}
exportContext.setCurrentTime(currentTime);
exportContext.setTerminationTime(terminationTime);
exportContext.setRefreshDuration(refreshDuration);
ExportContext updatedExportContext = getPersistenceManager().updateExportContext(refId, exportContext);
return updatedExportContext;
}
else
{
throw new OperationFailedException("Byte array format not recognized.");