mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Remove UserThreadMappedPersistableList and use PersistableList instead
We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
This commit is contained in:
parent
4f3ded6acf
commit
35d9338615
9 changed files with 16 additions and 47 deletions
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* 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.persistable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class UserThreadMappedPersistableList<T extends PersistablePayload> extends PersistableList<T>
|
||||
implements UserThreadMappedPersistableEnvelope {
|
||||
|
||||
public UserThreadMappedPersistableList(List<T> list) {
|
||||
super(list);
|
||||
}
|
||||
|
||||
public UserThreadMappedPersistableList() {
|
||||
}
|
||||
}
|
|
@ -19,7 +19,7 @@ package bisq.core.dao.governance.blindvote;
|
|||
|
||||
import bisq.core.dao.governance.ConsensusCritical;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import com.google.protobuf.Message;
|
||||
|
||||
|
@ -33,7 +33,7 @@ import lombok.EqualsAndHashCode;
|
|||
* List of my own blind votes. Blind votes received from other voters are stored in the BlindVoteStore.
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MyBlindVoteList extends UserThreadMappedPersistableList<BlindVote> implements ConsensusCritical {
|
||||
public class MyBlindVoteList extends PersistableList<BlindVote> implements ConsensusCritical {
|
||||
|
||||
MyBlindVoteList() {
|
||||
super();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
package bisq.core.dao.governance.bond.reputation;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -29,7 +29,7 @@ import lombok.EqualsAndHashCode;
|
|||
* PersistableEnvelope wrapper for list of MyReputations.
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MyReputationList extends UserThreadMappedPersistableList<MyReputation> {
|
||||
public class MyReputationList extends PersistableList<MyReputation> {
|
||||
|
||||
private MyReputationList(List<MyReputation> list) {
|
||||
super(list);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
package bisq.core.dao.governance.myvote;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import com.google.protobuf.Message;
|
||||
|
||||
|
@ -28,7 +28,7 @@ import java.util.stream.Collectors;
|
|||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MyVoteList extends UserThreadMappedPersistableList<MyVote> {
|
||||
public class MyVoteList extends PersistableList<MyVote> {
|
||||
|
||||
MyVoteList() {
|
||||
super();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
package bisq.core.dao.governance.proofofburn;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -29,7 +29,7 @@ import lombok.EqualsAndHashCode;
|
|||
* PersistableEnvelope wrapper for list of MyProofOfBurn objects.
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MyProofOfBurnList extends UserThreadMappedPersistableList<MyProofOfBurn> {
|
||||
public class MyProofOfBurnList extends PersistableList<MyProofOfBurn> {
|
||||
|
||||
private MyProofOfBurnList(List<MyProofOfBurn> list) {
|
||||
super(list);
|
||||
|
|
|
@ -20,7 +20,7 @@ package bisq.core.dao.governance.proposal;
|
|||
import bisq.core.dao.governance.ConsensusCritical;
|
||||
import bisq.core.dao.state.model.governance.Proposal;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -32,7 +32,7 @@ import lombok.EqualsAndHashCode;
|
|||
* PersistableEnvelope wrapper for list of proposals. Used in vote consensus, so changes can break consensus!
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MyProposalList extends UserThreadMappedPersistableList<Proposal> implements ConsensusCritical {
|
||||
public class MyProposalList extends PersistableList<Proposal> implements ConsensusCritical {
|
||||
|
||||
public MyProposalList(List<Proposal> list) {
|
||||
super(list);
|
||||
|
|
|
@ -20,7 +20,7 @@ package bisq.core.dao.state.model.governance;
|
|||
import bisq.core.dao.governance.ConsensusCritical;
|
||||
import bisq.core.dao.state.model.ImmutableDaoStateModel;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -35,7 +35,7 @@ import javax.annotation.concurrent.Immutable;
|
|||
*/
|
||||
@Immutable
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class BallotList extends UserThreadMappedPersistableList<Ballot> implements ConsensusCritical, ImmutableDaoStateModel {
|
||||
public class BallotList extends PersistableList<Ballot> implements ConsensusCritical, ImmutableDaoStateModel {
|
||||
|
||||
public BallotList(List<Ballot> list) {
|
||||
super(list);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
package bisq.core.dao.state.unconfirmed;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import com.google.protobuf.Message;
|
||||
|
||||
|
@ -28,7 +28,7 @@ import java.util.stream.Collectors;
|
|||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UnconfirmedBsqChangeOutputList extends UserThreadMappedPersistableList<UnconfirmedTxOutput> {
|
||||
public class UnconfirmedBsqChangeOutputList extends PersistableList<UnconfirmedTxOutput> {
|
||||
|
||||
UnconfirmedBsqChangeOutputList() {
|
||||
super();
|
||||
|
|
|
@ -19,7 +19,7 @@ package bisq.core.payment;
|
|||
|
||||
import bisq.core.proto.CoreProtoResolver;
|
||||
|
||||
import bisq.common.proto.persistable.UserThreadMappedPersistableList;
|
||||
import bisq.common.proto.persistable.PersistableList;
|
||||
|
||||
import com.google.protobuf.Message;
|
||||
|
||||
|
@ -30,7 +30,7 @@ import java.util.stream.Collectors;
|
|||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PaymentAccountList extends UserThreadMappedPersistableList<PaymentAccount> {
|
||||
public class PaymentAccountList extends PersistableList<PaymentAccount> {
|
||||
|
||||
public PaymentAccountList(List<PaymentAccount> list) {
|
||||
super(list);
|
||||
|
|
Loading…
Add table
Reference in a new issue