Documentation
¶
Index ¶
- Constants
- func Implement(v GlobalTransactionProxyService)
- type DefaultGlobalTransaction
- func (gtx *DefaultGlobalTransaction) Begin(ctx *ctx.RootContext) error
- func (gtx *DefaultGlobalTransaction) BeginWithTimeout(timeout int32, ctx *ctx.RootContext) error
- func (gtx *DefaultGlobalTransaction) BeginWithTimeoutAndName(timeout int32, name string, ctx *ctx.RootContext) error
- func (gtx *DefaultGlobalTransaction) Commit(ctx *ctx.RootContext) error
- func (gtx *DefaultGlobalTransaction) GetLocalStatus() api.GlobalSession_GlobalStatus
- func (gtx *DefaultGlobalTransaction) GetXid(ctx *ctx.RootContext) string
- func (gtx *DefaultGlobalTransaction) Resume(suspendedResourcesHolder *SuspendedResourcesHolder, ctx *ctx.RootContext) error
- func (gtx *DefaultGlobalTransaction) Rollback(ctx *ctx.RootContext) error
- func (gtx *DefaultGlobalTransaction) Suspend(unbindXid bool, ctx *ctx.RootContext) (*SuspendedResourcesHolder, error)
- type GlobalTransaction
- type GlobalTransactionProxyService
- type GlobalTransactionRole
- type SuspendedResourcesHolder
Constants ¶
View Source
const ( DefaultGlobalTxTimeout = 60000 DefaultGlobalTxName = "default" )
Variables ¶
This section is empty.
Functions ¶
func Implement ¶
func Implement(v GlobalTransactionProxyService)
Types ¶
type DefaultGlobalTransaction ¶
type DefaultGlobalTransaction struct {
XID string
Status api.GlobalSession_GlobalStatus
Role GlobalTransactionRole
// contains filtered or unexported fields
}
func CreateNew ¶
func CreateNew() *DefaultGlobalTransaction
func GetCurrent ¶
func GetCurrent(ctx *ctx.RootContext) *DefaultGlobalTransaction
func GetCurrentOrCreate ¶
func GetCurrentOrCreate(ctx *ctx.RootContext) *DefaultGlobalTransaction
func (*DefaultGlobalTransaction) Begin ¶
func (gtx *DefaultGlobalTransaction) Begin(ctx *ctx.RootContext) error
func (*DefaultGlobalTransaction) BeginWithTimeout ¶
func (gtx *DefaultGlobalTransaction) BeginWithTimeout(timeout int32, ctx *ctx.RootContext) error
func (*DefaultGlobalTransaction) BeginWithTimeoutAndName ¶
func (gtx *DefaultGlobalTransaction) BeginWithTimeoutAndName(timeout int32, name string, ctx *ctx.RootContext) error
func (*DefaultGlobalTransaction) Commit ¶
func (gtx *DefaultGlobalTransaction) Commit(ctx *ctx.RootContext) error
func (*DefaultGlobalTransaction) GetLocalStatus ¶
func (gtx *DefaultGlobalTransaction) GetLocalStatus() api.GlobalSession_GlobalStatus
func (*DefaultGlobalTransaction) GetXid ¶
func (gtx *DefaultGlobalTransaction) GetXid(ctx *ctx.RootContext) string
func (*DefaultGlobalTransaction) Resume ¶
func (gtx *DefaultGlobalTransaction) Resume(suspendedResourcesHolder *SuspendedResourcesHolder, ctx *ctx.RootContext) error
func (*DefaultGlobalTransaction) Rollback ¶
func (gtx *DefaultGlobalTransaction) Rollback(ctx *ctx.RootContext) error
func (*DefaultGlobalTransaction) Suspend ¶
func (gtx *DefaultGlobalTransaction) Suspend(unbindXid bool, ctx *ctx.RootContext) (*SuspendedResourcesHolder, error)
type GlobalTransaction ¶
type GlobalTransaction interface {
Begin(ctx *ctx.RootContext) error
BeginWithTimeout(timeout int32, ctx *ctx.RootContext) error
BeginWithTimeoutAndName(timeout int32, name string, ctx *ctx.RootContext) error
Commit(ctx *ctx.RootContext) error
Rollback(ctx *ctx.RootContext) error
Suspend(unbindXid bool, ctx *ctx.RootContext) (*SuspendedResourcesHolder, error)
Resume(suspendedResourcesHolder *SuspendedResourcesHolder, ctx *ctx.RootContext) error
GetStatus(ctx *ctx.RootContext) (api.GlobalSession_GlobalStatus, error)
GetXid(ctx *ctx.RootContext) string
GlobalReport(globalStatus api.GlobalSession_GlobalStatus, ctx *ctx.RootContext) error
GetLocalStatus() api.GlobalSession_GlobalStatus
}
type GlobalTransactionProxyService ¶
type GlobalTransactionProxyService interface {
GetProxyService() interface{}
GetMethodTransactionInfo(methodName string) *model.TransactionInfo
}
type GlobalTransactionRole ¶
type GlobalTransactionRole byte
const ( // The Launcher. The one begins the current global transaction. Launcher GlobalTransactionRole = iota // The Participant. The one just joins into a existing global transaction. Participant )
func (GlobalTransactionRole) String ¶
func (role GlobalTransactionRole) String() string
type SuspendedResourcesHolder ¶
type SuspendedResourcesHolder struct {
Xid string
}
Click to show internal directories.
Click to hide internal directories.