![]() |
fCraft
0.638
Custom Minecraft Server
|
Database of block changes. Each BlockDB object is associated with a world. Provides controls for storage/retention, and methods to look up data. More...
Public Member Functions | |
| bool | AutoToggleIfNeeded () |
| If EnabledState is set to Auto, calling this auto-enables / auto-disables BlockDB depending on world's BuildSecurity.MinRank and BlockDBAutoEnableRank config key. | |
| void | Clear () |
| Clears cache and deletes the .fbdb file. | |
| BlockDBEntry[] | Lookup (int max, BlockDBSearchType searchType,[NotNull] Func< BlockDBEntry, bool > selector) |
| Searches the database for BlockDBEntries, based on given criteria. | |
| void | Traverse ([NotNull] IBlockDBQueryProcessor processor) |
| Traverses the database, newest to oldest entries, processing each entry with the given IBlockDBQueryProcessor. | |
| BlockDBEntry[] | Lookup (int max, Vector3I coords) |
| Returns list of all changes done to the map at the given coordinate, newest to oldest. | |
| BlockDBEntry[] | Lookup (int max) |
| BlockDBEntry[] | Lookup (int max, TimeSpan span) |
| BlockDBEntry[] | Lookup (int max,[NotNull] BoundingBox area) |
| BlockDBEntry[] | Lookup (int max,[NotNull] BoundingBox area, TimeSpan span) |
| BlockDBEntry[] | Lookup (int max,[NotNull] PlayerInfo info, bool exclude) |
| BlockDBEntry[] | Lookup (int max,[NotNull] PlayerInfo info, bool exclude, TimeSpan span) |
| BlockDBEntry[] | Lookup (int max,[NotNull] PlayerInfo[] infos, bool exclude) |
| BlockDBEntry[] | Lookup (int max,[NotNull] PlayerInfo[] infos, bool exclude, TimeSpan span) |
| BlockDBEntry[] | Lookup (int max,[NotNull] BoundingBox area,[NotNull] PlayerInfo info, bool exclude) |
| BlockDBEntry[] | Lookup (int max,[NotNull] BoundingBox area,[NotNull] PlayerInfo info, bool exclude, TimeSpan span) |
| BlockDBEntry[] | Lookup (int max,[NotNull] BoundingBox area,[NotNull] PlayerInfo[] infos, bool exclude) |
| BlockDBEntry[] | Lookup (int max,[NotNull] BoundingBox area,[NotNull] PlayerInfo[] infos, bool exclude, TimeSpan span) |
| IDisposable | GetWriteLock () |
| Acquires and returns an exclusive (write) lock for this BlockDB. Disposing the object returned by this method releases the lock. | |
| IDisposable | GetReadLock () |
| Acquires and returns a shared (read) lock for this BlockDB. Disposing the object returned by this method releases the lock. | |
| XElement | SaveSettings () |
| XElement | SaveSettings (string rootName) |
| void | LoadSettings (XElement el) |
Public Attributes | |
| const string | XmlRootName = "BlockDB" |
Properties | |
| World | World [get, set] |
| World associated with this BlockDB. | |
| YesNoAuto | EnabledState [get, set] |
| Sets this BlockDB's enabled state to Yes (always on), No (aways off), or Auto (on or off depending on BlockDBAutoEnableRank config key and World's build permissions). | |
| bool | IsEnabled [get, set] |
| Checks whether this BlockDB is enabled (either automatically or manually). Set EnabledState to enable/disable. | |
| string | FileName [get] |
| Full path to the file where BlockDB data is stored. | |
| bool | IsPreloaded [get, set] |
| int | Limit [get, set] |
| bool | HasLimit [get] |
| Whether this BlockDB instance has a limit on the number of entries. | |
| TimeSpan | TimeLimit [get, set] |
| bool | HasTimeLimit [get] |
| static bool | IsEnabledGlobally [get, set] |
| Whether BlockDB was enabled at startup. Changing this setting currently requires a server restart. | |
Database of block changes. Each BlockDB object is associated with a world. Provides controls for storage/retention, and methods to look up data.
| bool fCraft.BlockDB.AutoToggleIfNeeded | ( | ) |
If EnabledState is set to Auto, calling this auto-enables / auto-disables BlockDB depending on world's BuildSecurity.MinRank and BlockDBAutoEnableRank config key.
| void fCraft.BlockDB.Clear | ( | ) |
Clears cache and deletes the .fbdb file.
| IDisposable fCraft.BlockDB.GetReadLock | ( | ) |
Acquires and returns a shared (read) lock for this BlockDB. Disposing the object returned by this method releases the lock.
| IDisposable fCraft.BlockDB.GetWriteLock | ( | ) |
Acquires and returns an exclusive (write) lock for this BlockDB. Disposing the object returned by this method releases the lock.
| void fCraft.BlockDB.LoadSettings | ( | XElement | el | ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| BlockDBSearchType | searchType, | ||
| [NotNull] Func< BlockDBEntry, bool > | selector | ||
| ) |
Searches the database for BlockDBEntries, based on given criteria.
| max | Maximum number of entries to check. |
| searchType | Type of search (ReturnAll, ReturnOldest, or ReturnNewest). See BlockDBSearchType enum. |
| selector | Function used to select BlockDBEntries to be returned. |
| ArgumentOutOfRangeException | max is less than 0. |
| ArgumentNullException | selector is null. |
| InvalidOperationException | BlockDB is disabled. |
| EndOfStreamException | The end of FBDB file is reached prematurely (corrupted file, or outside interference). |
| DataMisalignedException | FBDB file is not aligned to 20 bytes (likely corrupted). |
| IOException | An I/O error occurrs while trying to read FBDB file from disk. |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| Vector3I | coords | ||
| ) |
Returns list of all changes done to the map at the given coordinate, newest to oldest.
| max | Maximum number of changes to return. |
| coords | Coordinate to search at. |
| ArgumentOutOfRangeException | Given coordinates are outside the map. |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max | ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| TimeSpan | span | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] BoundingBox | area | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] BoundingBox | area, | ||
| TimeSpan | span | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] PlayerInfo | info, | ||
| bool | exclude | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] PlayerInfo | info, | ||
| bool | exclude, | ||
| TimeSpan | span | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] PlayerInfo[] | infos, | ||
| bool | exclude | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] PlayerInfo[] | infos, | ||
| bool | exclude, | ||
| TimeSpan | span | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] BoundingBox | area, | ||
| [NotNull] PlayerInfo | info, | ||
| bool | exclude | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] BoundingBox | area, | ||
| [NotNull] PlayerInfo | info, | ||
| bool | exclude, | ||
| TimeSpan | span | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] BoundingBox | area, | ||
| [NotNull] PlayerInfo[] | infos, | ||
| bool | exclude | ||
| ) |
| BlockDBEntry [] fCraft.BlockDB.Lookup | ( | int | max, |
| [NotNull] BoundingBox | area, | ||
| [NotNull] PlayerInfo[] | infos, | ||
| bool | exclude, | ||
| TimeSpan | span | ||
| ) |
| XElement fCraft.BlockDB.SaveSettings | ( | ) |
| XElement fCraft.BlockDB.SaveSettings | ( | string | rootName | ) |
| void fCraft.BlockDB.Traverse | ( | [NotNull] IBlockDBQueryProcessor | processor | ) |
Traverses the database, newest to oldest entries, processing each entry with the given IBlockDBQueryProcessor.
| processor | Processor to use for each BlockDBEntry. |
| ArgumentNullException | processor is null. |
| InvalidOperationException | BlockDB is disabled. |
| EndOfStreamException | The end of FBDB file is reached prematurely (corrupted file, or outside interference). |
| DataMisalignedException | FBDB file is not aligned to 20 bytes (likely corrupted). |
| IOException | An I/O error occurrs while trying to read FBDB file from disk. |
| const string fCraft.BlockDB.XmlRootName = "BlockDB" |
|
getset |
|
get |
Full path to the file where BlockDB data is stored.
|
get |
Whether this BlockDB instance has a limit on the number of entries.
|
get |
|
getset |
Checks whether this BlockDB is enabled (either automatically or manually). Set EnabledState to enable/disable.
|
staticgetset |
Whether BlockDB was enabled at startup. Changing this setting currently requires a server restart.
|
getset |
|
getset |
|
getset |