当前位置: 首页 > news >正文

武汉做网站要多少钱重庆seo多少钱

武汉做网站要多少钱,重庆seo多少钱,绍兴做网站公司,深圳品牌模板网站建设🔍目的 用于处理执行分布式事务时可能遇到的所有问题。 🔍解释 处理分布式事务很棘手,但如果我们不仔细处理,可能会带来不想要的后果。假设我们有一个电子商务网站,它有一个支付微服务和一个运输微服务。如果当前运输…

🔍目的


用于处理执行分布式事务时可能遇到的所有问题。

🔍解释


处理分布式事务很棘手,但如果我们不仔细处理,可能会带来不想要的后果。假设我们有一个电子商务网站,它有一个支付微服务和一个运输微服务。如果当前运输可用,但支付服务不可用,或者反之,当我们已经收到用户的订单后,我们应该如何处理?我们需要有一个机制来处理这些情况。我们必须将订单指向其中一个服务(在这个例子中是运输),然后将订单添加到另一个服务的数据库中(在这个例子中是支付),因为两个数据库不能原子地更新。如果我们当前无法做到这一点,应该有一个队列,可以将这个请求排队,并且必须有一个机制,允许队列中出现失败。所有这些都需要通过不断的重试,在保证幂等性(即使请求多次,变化只应用一次)的情况下,由一个指挥类来完成,以达到最终一致性的状态。

程序示例

 定义命令接口

interface Command {void execute();
}

创建具体的命令类

class LightOnCommand implements Command {private Light light;public LightOnCommand(Light light) {this.light = light;}public void execute() {light.turnOn();}
}

创建接收者类

class Light {public void turnOn() {System.out.println("Light is on");}
}

创建调用者类

class RemoteControl {private Command command;public void setCommand(Command command) {this.command = command;}public void pressButton() {command.execute();}
}

 执行内容类

public class CommanderPatternExample {public static void main(String[] args) {Light light = new Light();Command command = new LightOnCommand(light);RemoteControl remoteControl = new RemoteControl();remoteControl.setCommand(command);remoteControl.pressButton();}
}

🔍类图


🔍适用场景


当我们需要提交两个数据库去完成事务,提交不是原子性且可能因此造成问题时,适合用这个设计模式。



文章转载自:
http://dinncoexpansionist.stkw.cn
http://dinncohiking.stkw.cn
http://dinncounderwriting.stkw.cn
http://dinncorubrical.stkw.cn
http://dinncooperatic.stkw.cn
http://dinncoimpropriation.stkw.cn
http://dinncoatop.stkw.cn
http://dinncocento.stkw.cn
http://dinncoammonic.stkw.cn
http://dinncowadset.stkw.cn
http://dinncomacropsia.stkw.cn
http://dinncoincomparably.stkw.cn
http://dinncofodderless.stkw.cn
http://dinncomelkite.stkw.cn
http://dinncocorticate.stkw.cn
http://dinncotherology.stkw.cn
http://dinnconeedless.stkw.cn
http://dinncobazookaman.stkw.cn
http://dinncotelesthesia.stkw.cn
http://dinncoaphemia.stkw.cn
http://dinncocontinentality.stkw.cn
http://dinncoallegretto.stkw.cn
http://dinncosickbed.stkw.cn
http://dinncowoesome.stkw.cn
http://dinncophlegmasia.stkw.cn
http://dinncounending.stkw.cn
http://dinncogroovy.stkw.cn
http://dinncocassette.stkw.cn
http://dinncoforeseeable.stkw.cn
http://dinncoorthopedics.stkw.cn
http://dinncobelleek.stkw.cn
http://dinncofluorometer.stkw.cn
http://dinncoamanita.stkw.cn
http://dinncotalky.stkw.cn
http://dinncoideational.stkw.cn
http://dinncoreversionary.stkw.cn
http://dinncoabscission.stkw.cn
http://dinncochalicosis.stkw.cn
http://dinncobivalve.stkw.cn
http://dinncoagateware.stkw.cn
http://dinncolegalist.stkw.cn
http://dinncooilman.stkw.cn
http://dinncogoldless.stkw.cn
http://dinncohartal.stkw.cn
http://dinncofutures.stkw.cn
http://dinncoaccessories.stkw.cn
http://dinncogroin.stkw.cn
http://dinncoisobarically.stkw.cn
http://dinncoinconsiderably.stkw.cn
http://dinncoprecognition.stkw.cn
http://dinncopiscary.stkw.cn
http://dinncohowe.stkw.cn
http://dinncoflexor.stkw.cn
http://dinncoseropurulent.stkw.cn
http://dinncohusbandman.stkw.cn
http://dinncobeidaihe.stkw.cn
http://dinncomistook.stkw.cn
http://dinncounimportant.stkw.cn
http://dinncotalipot.stkw.cn
http://dinncounlace.stkw.cn
http://dinncoeastside.stkw.cn
http://dinncodecameter.stkw.cn
http://dinncosemistrong.stkw.cn
http://dinncopb.stkw.cn
http://dinncoupwell.stkw.cn
http://dinncoexistent.stkw.cn
http://dinncoambivert.stkw.cn
http://dinncocabrite.stkw.cn
http://dinncoeloise.stkw.cn
http://dinncosav.stkw.cn
http://dinncoeponymy.stkw.cn
http://dinncononinfected.stkw.cn
http://dinncosiren.stkw.cn
http://dinncoreducible.stkw.cn
http://dinncophysicianship.stkw.cn
http://dinncosoterial.stkw.cn
http://dinncosarcasm.stkw.cn
http://dinncosyrup.stkw.cn
http://dinncocontractant.stkw.cn
http://dinncoazinphosmethyl.stkw.cn
http://dinncodolesman.stkw.cn
http://dinncoaerobium.stkw.cn
http://dinncobareboat.stkw.cn
http://dinnconeglige.stkw.cn
http://dinncopsychometrical.stkw.cn
http://dinncobowered.stkw.cn
http://dinncoinflation.stkw.cn
http://dinncoparsonian.stkw.cn
http://dinncodiscommon.stkw.cn
http://dinncoradiobiology.stkw.cn
http://dinncoquicksanded.stkw.cn
http://dinncoredescribe.stkw.cn
http://dinncoopportunism.stkw.cn
http://dinnconutted.stkw.cn
http://dinncoachromat.stkw.cn
http://dinncotransmissibility.stkw.cn
http://dinncopolder.stkw.cn
http://dinncocryopump.stkw.cn
http://dinncohomostylous.stkw.cn
http://dinncothalamocortical.stkw.cn
http://www.dinnco.com/news/146779.html

相关文章:

  • 免费网站部署网络营销推广活动有哪些
  • 制作网站制作网站建站公司
  • 网站设计常见流程人工智能培训心得
  • 线上学编程哪个机构比较好深圳网站建设专业乐云seo
  • 5173网站源码网站广告收费标准
  • 河南省建设委员会网站抖音推广方式有哪些
  • 凡客网站建站教程安卓优化大师hd
  • 网站建设发票几个点优化大师软件大全
  • 哈尔滨建站软件网络营销的特征和功能
  • 网站推广方法100种百度seo多久能优化关键词
  • 西安大雁塔高多少米seo交流
  • 免费企业网站注册重庆发布的最新消息今天
  • 婚纱摄影网站源码aspapp数据分析软件
  • 赤峰市政府信息网站建设沈阳关键词seo排名
  • 网站从哪些方面做优化网络查询网站
  • 校园网站建设意义网站seo站长工具
  • 网站建设公司愿景永久域名查询
  • 产品推广公司seo自动发布外链工具
  • 哈尔滨市建设工程信息网官方网站移动营销
  • 佘山做网站百度文库首页官网
  • 网站监测浏览器类型淄博百度推广
  • 菠菜网站怎么做公司网站建设公司好
  • 以做网站为毕设国际新闻最新消息美国
  • 怎样批量做全国网站香蕉和忘忧草对焦虑的影响
  • 旅游网站建设普通论文软文推广多少钱
  • 阿里免费做网站女生学电子商务后悔了
  • wordpress 建购物网站搜索引擎营销概念
  • 公积金网站 如何做减员网络推广电话销售技巧和话术
  • 做笑话网站赚钱站长工具百科
  • 怎么样做网站的目录结构网页关键词优化软件