One . Stateless

We all know that when only multiple threads access common resources , Data security issues may arise , So if we don't have public resources , Is there no such problem ?
public class NoStatusService { public void add(String status) {
System.out.println("add status:" + status); } public void update(String status)
{ System.out.println("update status:" + status); }}
Two . Immutable

If multiple threads access common resources, it is immutable , There will be no data security issues .
public class NoChangeService { public static final String DEFAULT_NAME =
"abc"; public void add(String status) { System.out.println("add status:" +
status); }}
Three . Secure release

If there are public resources in the class , However, it has no access to the outside world , That is, external security release , There is no thread safety issue
public class SafePublishService { private String name; public String getName()
{ return name; } public void add(String status) {

Technology
©2020 ioDraw All rights reserved
Huawei Hongmeng system learning notes 9- Ecological construction of developers JavaScript Do a simple guess number games Centralized processing (mean centering) The myth and truth of JS Experimental summary of basic key knowledge ( whole ) Detailed explanation PHP Medium die,exit,returnPython Student information management system ( Lite )re Common methods of modules stata Basic operation of linear regression analysis flutter study -- Search box Docker Import of containers and mirrors , export