mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Define batch delete function types in coresponding behaviours
This commit is contained in:
parent
a2efde185a
commit
46c947bc76
@ -89,7 +89,18 @@
|
|||||||
{[{binary(), non_neg_integer(), xmlel()}], boolean(), count()} |
|
{[{binary(), non_neg_integer(), xmlel()}], boolean(), count()} |
|
||||||
{error, db_failure}.
|
{error, db_failure}.
|
||||||
|
|
||||||
-optional_callbacks([use_cache/1, cache_nodes/1, select_with_mucsub/6, select/6, select/7]).
|
-callback delete_old_messages_batch(binary(), erlang:timestamp(),
|
||||||
|
all | chat | groupchat,
|
||||||
|
pos_integer()) ->
|
||||||
|
{ok, non_neg_integer()} | {error, term()}.
|
||||||
|
|
||||||
|
-callback delete_old_messages_batch(binary(), erlang:timestamp(),
|
||||||
|
all | chat | groupchat,
|
||||||
|
pos_integer(), any()) ->
|
||||||
|
{ok, any(), non_neg_integer()} | {error, term()}.
|
||||||
|
|
||||||
|
-optional_callbacks([use_cache/1, cache_nodes/1, select_with_mucsub/6, select/6, select/7,
|
||||||
|
delete_old_messages_batch/5, delete_old_messages_batch/4]).
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% API
|
%%% API
|
||||||
|
@ -106,9 +106,14 @@
|
|||||||
-callback count_messages(binary(), binary()) -> {ets_cache:tag(), non_neg_integer()}.
|
-callback count_messages(binary(), binary()) -> {ets_cache:tag(), non_neg_integer()}.
|
||||||
-callback use_cache(binary()) -> boolean().
|
-callback use_cache(binary()) -> boolean().
|
||||||
-callback cache_nodes(binary()) -> [node()].
|
-callback cache_nodes(binary()) -> [node()].
|
||||||
|
-callback remove_old_messages_batch(binary(), non_neg_integer(), pos_integer()) ->
|
||||||
|
{ok, non_neg_integer()} | {error, term()}.
|
||||||
|
-callback remove_old_messages_batch(binary(), non_neg_integer(), pos_integer(), any()) ->
|
||||||
|
{ok, any(), non_neg_integer()} | {error, term()}.
|
||||||
|
|
||||||
-optional_callbacks([remove_expired_messages/1, remove_old_messages/2,
|
-optional_callbacks([remove_expired_messages/1, remove_old_messages/2,
|
||||||
use_cache/1, cache_nodes/1]).
|
use_cache/1, cache_nodes/1, remove_old_messages_batch/3,
|
||||||
|
remove_old_messages_batch/4]).
|
||||||
|
|
||||||
depends(_Host, _Opts) ->
|
depends(_Host, _Opts) ->
|
||||||
[].
|
[].
|
||||||
|
Loading…
Reference in New Issue
Block a user