JULEA
Loading...
Searching...
No Matches
distribution.h
Go to the documentation of this file.
1/*
2 * JULEA - Flexible storage framework
3 * Copyright (C) 2010-2024 Michael Kuhn
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
23#ifndef JULEA_DISTRIBUTION_DISTRIBUTION_H
24#define JULEA_DISTRIBUTION_DISTRIBUTION_H
25
26#if !defined(JULEA_H) && !defined(JULEA_COMPILATION)
27#error "Only <julea.h> can be included directly."
28#endif
29
30#include <glib.h>
31
32#include <bson.h>
33
34#include <jconfiguration.h>
35
37{
38 gpointer (*distribution_new)(guint, guint64);
39 void (*distribution_free)(gpointer);
40
41 void (*distribution_set)(gpointer, gchar const*, guint64);
42 void (*distribution_set2)(gpointer, gchar const*, guint64, guint64);
43
44 void (*distribution_serialize)(gpointer, bson_t*);
45 void (*distribution_deserialize)(gpointer, bson_t const*);
46
47 void (*distribution_reset)(gpointer, guint64, guint64);
48 gboolean (*distribution_distribute)(gpointer, guint*, guint64*, guint64*, guint64*);
49};
50
52
56
57#endif
void j_distribution_weighted_get_vtable(JDistributionVTable *)
Definition weighted.c:340
void j_distribution_single_server_get_vtable(JDistributionVTable *)
Definition single-server.c:277
void j_distribution_round_robin_get_vtable(JDistributionVTable *)
Definition round-robin.c:280
Definition distribution.h:37
void(* distribution_deserialize)(gpointer, bson_t const *)
Definition distribution.h:45
void(* distribution_free)(gpointer)
Definition distribution.h:39
void(* distribution_set2)(gpointer, gchar const *, guint64, guint64)
Definition distribution.h:42
void(* distribution_set)(gpointer, gchar const *, guint64)
Definition distribution.h:41
void(* distribution_reset)(gpointer, guint64, guint64)
Definition distribution.h:47
void(* distribution_serialize)(gpointer, bson_t *)
Definition distribution.h:44
gboolean(* distribution_distribute)(gpointer, guint *, guint64 *, guint64 *, guint64 *)
Definition distribution.h:48
gpointer(* distribution_new)(guint, guint64)
Definition distribution.h:38