diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-05-02 15:05:50 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-05-02 15:05:50 +0100 |
| commit | 74979e5c28b2577b6f1cae2d9c49e70d1bba5bb9 (patch) | |
| tree | 0c3ab5f5c3ecad68534d67837bba811e67359459 /include | |
| parent | 835f6480f5f0c00c60c056807e4ea0c29eda8159 (diff) | |
| download | rabbitmq-server-git-74979e5c28b2577b6f1cae2d9c49e70d1bba5bb9.tar.gz | |
restructure backing queue sync'ing
The code very much relied on the fact that sync_callback would always
return the same fun when a sync was required. So it makes sense to
capture that in the API by splitting sync_callback into a 'needs_sync'
predicate and a separate callback handler.
As a result we do not need the backing_queue_timeout_fun state member.
Diffstat (limited to 'include')
| -rw-r--r-- | include/rabbit_backing_queue_spec.hrl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rabbit_backing_queue_spec.hrl b/include/rabbit_backing_queue_spec.hrl index 0a0931ea34..1b536dfad1 100644 --- a/include/rabbit_backing_queue_spec.hrl +++ b/include/rabbit_backing_queue_spec.hrl @@ -57,7 +57,7 @@ -spec(set_ram_duration_target/2 :: (('undefined' | 'infinity' | number()), state()) -> state()). -spec(ram_duration/1 :: (state()) -> {number(), state()}). --spec(sync_callback/1 :: (state()) -> - ('undefined' | (fun ((A) -> {boolean(), A})))). +-spec(needs_sync/1 :: (state()) -> boolean()). +-spec(sync/1 :: (state()) -> state()). -spec(handle_pre_hibernate/1 :: (state()) -> state()). -spec(status/1 :: (state()) -> [{atom(), any()}]). |
