This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Install. | |
* MacOS : ~/Library/Preferences/IntelliJIdea/templates, (~/Library/Preferences/IntelliJIdea2017.1/templates) | |
--> | |
<templateSet group="java"> | |
<template name="j-po" value="protected $END$ " description="" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="HTML" value="true" /> | |
<option name="JAVA_CODE" value="true" /> | |
<option name="JSP" value="true" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.TimeUnit; | |
import org.junit.Test; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# endpoint URI | |
endpoint=$1 | |
# http execution timeout [sec] | |
timeout=1 | |
successful_http_code=${2:-200} | |
execution_fail_code="000" | |
max_attempts=${3:-5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.horiga.study.googleguava.examples.concurrent; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ThreadFactory; | |
import org.apache.commons.lang.RandomStringUtils; | |
import org.apache.commons.lang.math.RandomUtils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventMessage { | |
final int msgcode; | |
final String msg; | |
public EventMessage(int msgcode, String msg) { | |
this.msgcode = msgcode; | |
this.msg = msg; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.UUID; | |
import java.util.concurrent.TimeUnit; | |
import com.google.common.cache.Cache; | |
import com.google.common.cache.CacheBuilder; | |
public class GuavaCacheTest { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class A { | |
public void execute() { | |
System.out.println("This is A"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Test { | |
public static void main(String[] args) { | |
System.out.println("hello"); | |
} | |
} |