From 031f9ca91ade7fbb9e31c82545401b8a5531e539 Mon Sep 17 00:00:00 2001
From: xsipewe This module provides support for storing key-value
pairs in a table known as a registry, backing up registries to
- Mnesia in an atomic manner, and later restoring the contents of a
- registry from Mnesia.
A registry that has previously been created with
-
The function returns 0.
+Returns
Delete an object from the registry. The object is not - actually removed from the registry, it is only marked for later - removal so that on subsequent backups to Mnesia, the - corresponding object can be removed from the Mnesia table as +
Deletes an object from the registry. The object is not
+ removed from the registry, it is only marked for later
+ removal so that on later backups to
The object will be removed from the registry after a call to + object will be reused.
+The object is removed from the registry after a call to
If the object was found, the function returns 0 indicating - success. Otherwise the function returns -1.
+ +Returns
Dump the contents of a registry to a Mnesia table in an - atomic manner, i.e. either all data will be updated, or none of - it will. If any errors are encountered while backing up - the data, the entire operation is aborted. -
-If
Dumps the contents of a registry to a
If
Alternatively, setting flags to EI_FORCE will cause a full
- backup to be done, and EI_NOPURGE will cause the deleted objects
- to be left in the registry afterwards. These can be bitwise ORed
- together if both behaviours are desired. If EI_NOPURGE was
- specified, you can use
The function returns 0 on success, or -1 on failure.
+ objects that had been marked for deletion are deleted. +Alternatively, setting flags to
Returns
Get the value associated with
On success, the function returns the value associated with
Gets the value associated with
On success, the function returns the value associated with
+
Get the value associated with
On success, the function returns the value associated with
Gets the value associated with
On success, the function returns the value associated with
+
Get the value associated with
Gets the value associated with
On success, the function returns the value associated with
-
Get the value associated with
Gets the value associated with
On success, the function returns the value associated with
-
This is a general function for retrieving any kind of - object from the registry. -
-If the function succeeds,
A general function for retrieving any kind of + object from the registry.
+The buffer pointed to by
If
On success,
Mark a registry object as dirty. This will ensure that - it is included in the next backup to Mnesia. Normally this - operation will not be necessary since all of the normal registry - 'set' functions do this automatically. However if you have +
Marks a registry object as dirty. This ensures that
+ it is included in the next backup to
The function returns 0 on success, or -1 on failure.
+ and then let the registry know about them. +Returns
Open (create) a registry. The registry will be
- initially empty. Use
Opens (creates) a registry, which initially is empty. To
+ close the registry later, use
On success, an empty registry will be returned. On failure, NULL - will be returned.
+ appropriate for your needs. To change the size later, use +Returns an empty registry on success, otherwise
Remove all objects marked for deletion. When objects
- are deleted with
Removes all objects marked for deletion. When objects
+ are deleted with
The function returns 0 on success, or -1 on failure.
+ deletion. +Returns
Change the size of a registry. -
+Changes the size of a registry.
On success, the registry will be resized, all contents - rehashed, and the function will return 0. On failure, the - registry will be left unchanged and the function will return -1.
+ number is increased to the nearest larger prime number. +On success, the registry is resized, all contents
+ rehashed, and
The contents of a Mnesia table are read into the - registry. -
-Note that only tables of a certain format can be
- restored, i.e. those that have been created and backed up to
- with
The contents of a
Notice that only tables of a certain format can be
+ restored, that is, those that have been created and backed up to
+ with
After the restore operation, the entire contents of the - registry is marked as unmodified. Note that this includes any + registry is marked as unmodified. Notice that this includes any objects that were modified before the restore and not - overwritten by the restore. -
-The function returns 0 on success, or -1 on failure.
+ overwritten by the restore. +Returns
Create a key-value pair with the specified
The function returns 0 on success, or -1 on failure.
+Creates a key-value pair with the specified
Returns
Create a key-value pair with the specified
The function returns 0 on success, or -1 on failure.
+Creates a key-value pair with the specified
Returns
Create a key-value pair with the specified
The function returns 0 on success, or -1 on failure.
+Creates a key-value pair with the specified
Returns
Create a key-value pair with the specified
The function returns 0 on success, or -1 on failure.
+Creates a key-value pair with the specified
Returns
Create a key-value pair with the specified
Creates a key-value pair with the specified
If
If you wish to store an arbitrary pointer in the registry,
- specify a
The function returns 0 on success, or -1 on failure.
+ specify aReturns
Return information about an object. -
-Returns information about an object.
+
- In
The
The function returns 0 and initializes
In
Field
Returns
Return information about a registry. Using information +
Returns information about a registry. Using information returned by this function, you can see whether the size of the - registry is suitable for the amount of data it contains. -
-
- The
Field
On success, the function returns 0 and
On success,