Я пытаюсь отсортировать Hazelcast IList, используя следующий код
Класс PaymentChannelEntry
public class PaymentChannelEntry implements Serializable {
private static final long serialVersionUID = 5416475057971472127L;
private Long executionTimestamp; // timestamp of the time of the transaction in Zulu time zone (UTC)
private BigDecimal transactionAmount; // The amount of the transaction that contributes to the associated payment channel
public PaymentChannelEntry(Long executionTimestamp, BigDecimal transactionAmount) {
this.executionTimestamp = executionTimestamp;
this.transactionAmount = transactionAmount;
}
public Long getExecutionTimestamp() {
return executionTimestamp;
}
public void setExecutionTimestamp(Long executionTimestamp) {
this.executionTimestamp = executionTimestamp;
}
public BigDecimal getTransactionAmount() {
return transactionAmount;
}
public void setTransactionAmount(BigDecimal transactionAmount) {
this.transactionAmount = transactionAmount;
}
}
Затем я выбираю список PaymentChannelEntry из Hazelcast IList
IList<PaymentChannelEntry> entryIList = channelStore.getChannelEntryList(channelData.getType())
Затем, когда я использую метод sort
, он выдает исключение:
java.lang.UnsupportedOperationException
at com.hazelcast.util.UnmodifiableListIterator.set(UnmodifiableListIterator.java:30)
at java.util.List.sort(List.java:482)
Любое решение будет оценено.
Спасибо.