Class ArchivePVAction

  • All Implemented Interfaces:

    public class ArchivePVAction
    extends Object
    implements BPLAction
    BPL for archiving a PV. Here's an example of how to archive a couple of PV's using a JSON request.
     $ cat archivePVs.json 
      {"samplingperiod": "1.0", "pv": "mshankar:arch:sine", "samplingmethod": "SCAN"},
      {"samplingperiod": "2.0", "pv": "mshankar:arch:cosine", "samplingmethod": "MONITOR"}
     $ curl -H "Content-Type: application/json" --data @archivePVs.json http://localhost:17665/mgmt/bpl/archivePV
      { "pvName": "mshankar:arch:sine", "status": "Archive request submitted" },
      { "pvName": "mshankar:arch:cosine", "status": "Archive request submitted" }
     After some time...
     $ GET "http://localhost:17665/mgmt/bpl/getPVStatus?pv=mshankar:arch:*" 
      {"lastRotateLogs":"Never","appliance":"appliance0","pvName":"mshankar:arch:cosine","pvNameOnly":"mshankar:arch:cosine","connectionState":"true","lastEvent":"Oct\/12\/2015 13:54:53 -07:00","samplingPeriod":"2.0","isMonitored":"true","connectionLastRestablished":"Never","connectionFirstEstablished":"Oct\/12\/2015 13:53:05 -07:00","connectionLossRegainCount":"0","status":"Being archived"},
      {"lastRotateLogs":"Never","appliance":"appliance0","pvName":"mshankar:arch:sine","pvNameOnly":"mshankar:arch:sine","connectionState":"true","lastEvent":"Oct\/12\/2015 13:54:53 -07:00","samplingPeriod":"1.0","isMonitored":"false","connectionLastRestablished":"Never","connectionFirstEstablished":"Oct\/12\/2015 13:53:05 -07:00","connectionLossRegainCount":"0","status":"Being archived"}
  • pv The name of the pv to be archived. If archiving more than one PV, use a comma separated list. You can also send the PV list as part of the POST body using standard techniques. If you need to specify different archiving parameters for each PV, send the data as a JSON array (remember to send the content type correctly).
  • samplingperiod The sampling period to be used. Optional, default value is 1.0 seconds.
  • samplingmethod The sampling method to be used. For now, this is one of SCAN or MONITOR. Optional, default value is MONITOR.
  • controllingPV The controlling PV for coditional archiving. Optional; if unspecified, we do not use conditional archiving.
  • policy Override the policy execution process and use this policy instead. Optional; if unspecified, we go thru the normal policy execution process.
  • appliance Optional; you can specify an appliance in a cluster. If specified (value is the identity of the appliance), the sampling and archiving are done on the specified appliance.