Search in sources :

Example 6 with SessionStorable

use of io.seata.server.store.SessionStorable in project XHuiCloud by sindaZeng.

the class TransactionWriteStore method decode.

@Override
public void decode(byte[] src) {
    ByteBuffer byteBuffer = ByteBuffer.wrap(src);
    byte[] bySessionRequest = new byte[src.length - 1];
    byteBuffer.get(bySessionRequest);
    byte byOpCode = byteBuffer.get();
    this.operate = LogOperation.getLogOperationByCode(byOpCode);
    SessionStorable tmpSessionStorable = getSessionInstanceByOperation(this.operate);
    tmpSessionStorable.decode(bySessionRequest);
    this.sessionRequest = tmpSessionStorable;
}
Also used : SessionStorable(io.seata.server.store.SessionStorable) ByteBuffer(java.nio.ByteBuffer)

Aggregations

SessionStorable (io.seata.server.store.SessionStorable)6 TransactionWriteStore (io.seata.server.storage.file.TransactionWriteStore)3 FileTransactionStoreManager (io.seata.server.storage.file.store.FileTransactionStoreManager)3 TransactionStoreManager (io.seata.server.store.TransactionStoreManager)3 ShouldNeverHappenException (io.seata.common.exception.ShouldNeverHappenException)2 BranchSession (io.seata.server.session.BranchSession)2 GlobalSession (io.seata.server.session.GlobalSession)2 AbstractTransactionStoreManager (io.seata.server.store.AbstractTransactionStoreManager)2 LogOperation (io.seata.server.store.TransactionStoreManager.LogOperation)2 ByteBuffer (java.nio.ByteBuffer)2 TransactionException (io.seata.core.exception.TransactionException)1 BranchStatus (io.seata.core.model.BranchStatus)1 GlobalStatus (io.seata.core.model.GlobalStatus)1 SessionCondition (io.seata.server.session.SessionCondition)1 SessionManager (io.seata.server.session.SessionManager)1 ReloadableStore (io.seata.server.storage.file.ReloadableStore)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1