Don't start transactions while holding locks. #272

This commit is contained in:
akwizgran
2016-03-29 15:21:46 +01:00
parent 685a864b43
commit e58ca00979
6 changed files with 200 additions and 180 deletions

View File

@@ -26,12 +26,14 @@ public interface KeyManager {
* contact over the given transport, or null if an error occurs or the
* contact does not support the transport.
*/
StreamContext getStreamContext(ContactId c, TransportId t);
StreamContext getStreamContext(ContactId c, TransportId t)
throws DbException;
/**
* Looks up the given tag and returns a {@link StreamContext} for reading
* from the corresponding stream, or null if an error occurs or the tag was
* unexpected.
*/
StreamContext getStreamContext(TransportId t, byte[] tag);
StreamContext getStreamContext(TransportId t, byte[] tag)
throws DbException;
}