Don't do IO while holding database locks.

This commit is contained in:
akwizgran
2011-09-23 12:55:23 +01:00
parent 09971c8460
commit b675c38953
5 changed files with 85 additions and 67 deletions

View File

@@ -7,9 +7,12 @@ import net.sf.briar.api.protocol.BatchId;
/** An interface for creating a batch packet. */
public interface BatchWriter {
/** Returns the capacity of the batch. */
int getCapacity();
/**
* Sets the maximum length of the serialised batch. If this method is not
* called, the default is ProtocolConstants.MAX_PACKET_LENGTH;
* Sets the maximum length of the serialised batch; the default is
* ProtocolConstants.MAX_PACKET_LENGTH;
*/
void setMaxPacketLength(int length);