[Java Foundation] try, catch, finally
In this paper, try, catch, finally and return are combined by several examples.
Example 1:
public String finallyTest() {
String s = null;
try {
System.out.println("Enter try block");
s = "try block";
//String .valueOf(null);
} catch (Exception e) {
// TODO: handle exception
System.out.println("Enter c ...
Posted by sysera on Sun, 27 Jan 2019 08:51:14 -0800
Talk about netty buffer watermark s of storm client
order
This paper mainly studies netty buffer watermark s of storm client
Config
storm-2.0.0/storm-client/src/jvm/org/apache/storm/Config.java
/**
* Netty based messaging: The netty write buffer high watermark in bytes.
* <p>
* If the number of bytes queued in the netty's write buffer exceeds this value, the netty {@code ...
Posted by bob1660 on Mon, 21 Jan 2019 13:03:14 -0800
java design pattern 1 (from: http://blog.csdn.NET/zhangerqing)
Design Patterns
The Foundation of Reusable Object-Oriented Software
Design pattern is a set of repeated use, most people know, classification and cataloguing, code design experience summary. Design patterns are used to reuse code, make it easier for others to understand, and ensure code reliability. Undoubtedly, design patterns are ...
Posted by jane on Mon, 07 Jan 2019 09:51:10 -0800
On Date/Timestamp Value in A Distributed System
On Date or Time Stamp Types in Distributed Systems
Recently, using Inceptor to query fields of type Date or Timestamp in TDH, we have encountered many problems with unstable or incorrect return values. There are two main problems:
Dates of some special Date types are extra hours and seconds, and they are all "01:00:00"
Date/Timest ...
Posted by gregsmith on Sun, 06 Jan 2019 11:24:09 -0800
Usage of jvm monitoring tools jps,jstat,jstack,jmap
Jps, jstat, jstack and jmap are commonly used tools to analyze problems encountered by tomcat when analyzing jvm in operation and maintenance.The common problems of tomcat are: OOM, lock dead, lock contention, Java consumes too much CPU The above tools can be used for analysis.Fast Entry of Common Analytical Methods in Production:&n ...
Posted by bradleybebad on Tue, 25 Dec 2018 19:18:06 -0800
JSP action label useBean - < jsp: useBean > create an object
This label is the most important label in my opinion.
Firstly, the characteristics of Java Bean are introduced.
It can be used on any machine with JVM without recompiling.
1. Write rules for JavaBean s:
(1) If the name of the member variable of a class is xxx, two methods can be defined in the class to change or obtain the value of the m ...
Posted by Roble on Mon, 24 Dec 2018 23:33:06 -0800
(cljs / Run-at (JSVM.: browser) " build a just available development environment! ")
Preface
Last time, after understanding the basic grammar of cljs and the strange error prompt of clojurescript.net, we must painfully build a local development environment for further study of cljs.
Existing build tools
Because browsers can only run JS, but can not run cljs directly, we need to build a precompiled environment to compile cljs in ...
Posted by guxin1999 on Thu, 20 Dec 2018 03:09:06 -0800
java.lang.OutOfMemoryError: GC overhead limit exceeded filling experience
Reprinted to https://www.cnblogs.com/hucn/p/3572384.html
I encountered the problem of throwing an exception java.lang.OutOfMemoryError when I deployed locally: GC overhead limit exceeded caused the service to fail. Looking at the log, I found that too many resources were loaded into memory, the local performance was not good, and the gc ti ...
Posted by Anas_M.M.F on Sun, 16 Dec 2018 22:48:04 -0800
FileInputStream and FileOutputStream for JDK 1.7 java.io Source Learning
Files should be a common data source in development, so FileInputStream and FileOutputStream are important implementation classes in Java IO byte stream.
Before I talk about FileInputStream and FileOutputStream, I have to mention File classes.
File is also a class in the java.io package. It is mainly used to describe the path of files and fi ...
Posted by supanoob on Sat, 15 Dec 2018 14:51:03 -0800