Coder Social home page Coder Social logo

dewey00 / banksystem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magicyst/banksystem

0.0 0.0 0.0 49 KB

由于引入多线程环境:开始的业务层单例是一个以时间换取空间的策略。先在业务多个用户登录,业务层处理存在排队现象 现在业务层取消单例,让每个用户拥有独有的业务服务 问题: 1.一个账号多人请求登录,出现多账号在线。应用dao层对象池保存登录用户信息HashMap<username,userFile> - dao层注册于登录前需要先判断user_pool while(uers.get(username) != null) 2.多个账号同时给一个账号转账时,会出现getMoney(),setMoney()的线程安全问题。 - 给改变ProperFiePo对象的money值的都加同步锁synchronized,防止多线程操作 - 而用户名密码,因为用了user_pool控制,有且仅有一个相同用户在线,所有不会有线程安全问题 3.由于用户频繁创建,所有把dao工厂设为单例模式,防止频繁创建耗费资源,用了静态内部类BankDaoFactoryHolder 实现延迟加载,提高系统初始化速度已经线程安全问题的解决 4.GUI界面的窗口关闭事件的监听,已经用户的一些误操作提示。

Java 98.13% Roff 1.87%

banksystem's People

Contributors

magicyst avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.