-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f1b309
commit 21a4695
Showing
7 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | ||
<component name="FacetManager"> | ||
<facet type="Spring" name="Spring"> | ||
<configuration /> | ||
</facet> | ||
</component> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> | ||
<output url="file://$MODULE_DIR$/build/classes" /> | ||
<output-test url="file://$MODULE_DIR$/build/test-classes" /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/resource" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated-sources/annotations" isTestSource="false" generated="true" /> | ||
<excludeFolder url="file://$MODULE_DIR$/build" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="library" name="Maven: junit:junit:4.4" level="project" /> | ||
<orderEntry type="library" name="Maven: cglib:cglib:3.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.ow2.asm:asm:4.2" level="project" /> | ||
<orderEntry type="library" name="Maven: org.openjdk.jmh:jmh-core:1.6.1" level="project" /> | ||
<orderEntry type="library" name="Maven: net.sf.jopt-simple:jopt-simple:4.6" level="project" /> | ||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.2" level="project" /> | ||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.openjdk.jmh:jmh-generator-annprocess:1.6.1" level="project" /> | ||
<orderEntry type="library" name="Maven: com.google.zxing:core:3.2.0" level="project" /> | ||
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.2.0" level="project" /> | ||
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" /> | ||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.4" level="project" /> | ||
<orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:3.5.3" level="project" /> | ||
<orderEntry type="library" name="Maven: org.apache.thrift:libthrift:0.9.2" level="project" /> | ||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.5.8" level="project" /> | ||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.2.5" level="project" /> | ||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.2.4" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:log4j-over-slf4j:1.7.10" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jcl-over-slf4j:1.7.10" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jul-to-slf4j:1.7.10" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:1.15" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:1.7.0.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.0.9.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.0.9.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.0.9.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.0.9.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.0.9.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.0.9.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.10.0.RELEASE" level="project" /> | ||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.13.0" level="project" /> | ||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.23" level="project" /> | ||
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.11.4" level="project" /> | ||
</component> | ||
</module> |
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
14 changes: 14 additions & 0 deletions
14
Java8s/src/org/luckystars/concurrent/counter/AtomitCounter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.luckystars.concurrent.counter; | ||
|
||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
public class AtomitCounter { | ||
|
||
private final AtomicLong count = new AtomicLong(0L); | ||
|
||
public Long countPlus(){ | ||
return count.incrementAndGet(); | ||
} | ||
|
||
|
||
} |
4 changes: 4 additions & 0 deletions
4
Java8s/src/org/luckystars/concurrent/counter/SyncCounter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.luckystars.concurrent.counter; | ||
|
||
public class SyncCounter { | ||
} |
18 changes: 18 additions & 0 deletions
18
Java8s/src/org/luckystars/concurrent/counter/SyncInteger.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.luckystars.concurrent.counter; | ||
|
||
import org.apache.http.annotation.GuardedBy; | ||
import org.apache.http.annotation.ThreadSafe; | ||
|
||
@ThreadSafe | ||
public class SyncInteger { | ||
@GuardedBy("this") | ||
private int value; | ||
|
||
public synchronized int getValue() { | ||
return value; | ||
} | ||
|
||
public synchronized void setValue(int value) { | ||
this.value = value; | ||
} | ||
} |
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