nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Implement bundle flush api #16

Closed jpswinski closed 5 years ago

jpswinski commented 5 years ago

The library needs to provide an API to flush all active bundles back to the storage service and treat them as if they had never been dequeued.

The tricky part of this is that when they go back to the storage service, they will need to be at the front of the queue and the first to be dequeued when the library load call is made.

This is necessary for gracefully cleaning up a channel.

jpswinski commented 5 years ago

A flush is now implemented as a destructive process - it will relinquish all bundles in the active table. This is okay and desired. If the user wants to keep the bundles around and somehow attach to them later, then the channel should be closed without flushing.