Add GetDataResponsePriority enum

Add default getGetDataResponsePriority impl. to NetworkPayload

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2023-01-04 18:23:26 -05:00
parent 803a58eab7
commit 23e45a2843
No known key found for this signature in database
GPG key ID: 02AA2BAE387C8307
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.common.proto.network;
/**
* Represents priority used at truncating data set at getDataResponse if total data exceeds limits.
*/
public enum GetDataResponsePriority {
LOW,
MID,
HIGH
}

View file

@ -23,4 +23,7 @@ import bisq.common.Payload;
* Interface for objects used inside WireEnvelope or other WirePayloads.
*/
public interface NetworkPayload extends Payload {
default GetDataResponsePriority getGetDataResponsePriority() {
return GetDataResponsePriority.LOW;
}
}