Skip to content
Snippets Groups Projects
Unverified Commit f2e1723b authored by akwizgran's avatar akwizgran
Browse files

Added thread safety documentation to interfaces.

parent f9aa5a4e
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,10 @@ import java.util.Map; ...@@ -30,6 +30,10 @@ import java.util.Map;
/** /**
* Encapsulates the database implementation and exposes high-level operations * Encapsulates the database implementation and exposes high-level operations
* to other components. * to other components.
* <p>
* This interface's methods are blocking, but they do not call out into other
* components except to broadcast {@link org.briarproject.api.event.Event
* Events}, so they can safely be called while holding locks.
*/ */
public interface DatabaseComponent { public interface DatabaseComponent {
......
...@@ -3,5 +3,9 @@ package org.briarproject.api.event; ...@@ -3,5 +3,9 @@ package org.briarproject.api.event;
/** An interface for receiving notifications when events occur. */ /** An interface for receiving notifications when events occur. */
public interface EventListener { public interface EventListener {
/**
* Called when an event is broadcast. Implementations of this method must
* not block.
*/
void eventOccurred(Event e); void eventOccurred(Event e);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment