Added thread safety documentation to interfaces.

This commit is contained in:
akwizgran
2016-01-26 10:31:32 +00:00
parent f9aa5a4ef9
commit f2e1723b24
2 changed files with 8 additions and 0 deletions

View File

@@ -30,6 +30,10 @@ import java.util.Map;
/**
* Encapsulates the database implementation and exposes high-level operations
* 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 {

View File

@@ -3,5 +3,9 @@ package org.briarproject.api.event;
/** An interface for receiving notifications when events occur. */
public interface EventListener {
/**
* Called when an event is broadcast. Implementations of this method must
* not block.
*/
void eventOccurred(Event e);
}