Skip to content
Snippets Groups Projects
Commit 4c8701b3 authored by Alexandre TISON's avatar Alexandre TISON
Browse files

Added command for shifting attributes from one archiver to another

TODO: implement
parent 27b95a3e
No related branches found
No related tags found
1 merge request!3TANGOARCH-895 : Added shiftArchiver command
......@@ -590,4 +590,18 @@ public class ArchivingManager {
return res;
}
/**
* Moves an attribute from one archiver to another
* @param argin attributeName,archiverName
* @throws DevFailed if the attribute cannot be moved since it is not archived or if it failed
*/
@Command(name = "ShiftArchiver", inTypeDesc = "attributeName,archiverName")
public void shiftArchiver(final String[] argin) throws DevFailed {
auditLogger.debug("Entering ShiftArchiver with params {}", String.join(",", argin));
if (argin.length != 2) {
throw DevFailedUtils.newDevFailed("Invalid number of arguments");
}
databaseAccess.shiftArchiver(argin[0], argin[1]);
auditLogger.debug("Exiting ShiftArchiver");
}
}
......@@ -217,4 +217,9 @@ public class HDBTDBAccess implements IArchivingAccess {
public int createNewContext(final String contextName, String description) throws DevFailed {
throw DevFailedUtils.newDevFailed("Not supported for HDB or TDB");
}
@Override
public void shiftArchiver(final String attributeName, final String archiverName) throws DevFailed {
return; // TODO: implement
}
}
......@@ -33,4 +33,6 @@ public interface IArchivingAccess {
String[] getAllContexts() throws DevFailed;
int createNewContext(final String contextName, String description) throws DevFailed;
void shiftArchiver(final String attributeName, final String archiverName) throws DevFailed;
}
......@@ -198,4 +198,9 @@ public class TimeseriesAccess implements IArchivingAccess {
}
return inserterService.createNewContext(contextName, description);
}
@Override
public void shiftArchiver(final String attributeName, final String archiverName) throws DevFailed {
return; // TODO: implement
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment