mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +01:00
Added thread safety documentation to interfaces.
This commit is contained in:
@@ -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;
|
|||||||
/** 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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user