Asynchronous Database Access: Difference between revisions
Content deleted Content added
imported>Hendrik Brummermann No edit summary |
imported>Hendrik Brummermann No edit summary |
||
| (38 intermediate revisions by 2 users not shown) | |||
Line 1:
{{Navigation for Marauroa Top|Internals}}
{{Navigation for Marauroa Developers}}
Line 15 ⟶ 12:
== Kinds of database operations ==
Most of the database operations in marauroa are write only, making it easy to put them into a queue for asynchronous processing. Read operations are more difficult to handle because the data returned by them is needed. That is
There are three kinds of read operations:
Line 44 ⟶ 41:
== Implementation ==
The following example for a simple write operation assumes that GameEvent implements/extends
new GameEvent(attacker.getName(),
"attack", target.getName());
Line 61 ⟶ 55:
Since we ignore 1) for now, this leaves us with 2): We need a way to receive the data produced by an read operation:
UUID uuid =
this, new GetCharacterList(username));
The
getResults() method, which fetches all results of
We
approach.
List<GetCharacterList>
[[Category:Marauroa]]
{{#breadcrumbs: [[Marauroa]] | [[Navigation for Marauroa Developers|Internals]] | [[Marauroa Roadmap|Roadmap]] | [[Asynchronous Database Access]] }}
| |||