This file contains hidden or 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
/** | |
* A qualifier for the server http port. | |
* | |
* @author [email protected] (Ben Manes) | |
*/ | |
@BindingAnnotation | |
@Retention(RUNTIME) | |
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD}) | |
public @interface HttpPort {} |
This file contains hidden or 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.IOException; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletResponse; |
This file contains hidden or 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 final class FinalizeBenchmark extends Benchmark { | |
public int timeFinalize(int reps) { | |
int dummy = 0; | |
for (int i = 0; i < reps; i++) { | |
Object o = new Object() { | |
@Override protected void finalize() { | |
toString(); | |
} | |
}; |
This file contains hidden or 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
23:36:18.125 [main] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource | |
23:36:18.129 [main] DEBUG o.s.j.d.LazyConnectionDataSourceProxy - Connecting to database for operation 'getMetaData' | |
23:36:18.132 [main] DEBUG c.g.f.c.dbsupport.DbSupportFactory - Database: H2 1.3 | |
23:36:18.134 [main] DEBUG com.googlecode.flyway.core.Flyway - DDL Transactions Supported: false | |
23:36:18.134 [main] DEBUG com.googlecode.flyway.core.Flyway - Schema: file_vault | |
23:36:18.139 [main] DEBUG o.s.j.d.LazyConnectionDataSourceProxy - Using existing database connection for operation 'setAutoCommit' | |
23:36:18.139 [main] DEBUG o.s.j.d.LazyConnectionDataSourceProxy - Using existing database connection for operation 'prepareStatement' | |
23:36:18.141 [main] DEBUG c.g.flyway.core.command.DbSchemas - Schema "file_vault" already exists. Skipping schema creation. | |
23:36:18.141 [main] DEBUG o.s.j.d.LazyConnectionDataSourceProxy - Using existing database connection for operation 'commit' | |
23:36:18.142 [main] DEBUG o.s.j. |
This file contains hidden or 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
/** | |
* A validator to verify that the jOOQ generated tables match the database table metadata. | |
* | |
* @author Ben Manes ([email protected]) | |
*/ | |
final class SchemaValidator { | |
private static final Logger logger = LoggerFactory.getLogger(SchemaValidator.class); | |
private final List<Schema> schemas; | |
private final DSLContext db; |
This file contains hidden or 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
/** | |
* A test for the connection life-cycle management within jOOQ managed operations. | |
* | |
* @author Ben Manes ([email protected]) | |
*/ | |
@Guice(modules = {JooqTestModule.class, TestModule.class}) | |
public class ConnectionLifecycleTest { | |
final AtomicInteger counter = new AtomicInteger(); | |
@Inject CountingExecuteListener countingExecuteListener; |
This file contains hidden or 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
apply from: "${rootDir}/gradle/java.gradle" | |
dependencies { | |
compile libraries.guava | |
compile libraries.guice | |
compile libraries.jooq | |
} | |
buildscript { | |
repositories { |
This file contains hidden or 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
apply from: "${rootDir}/coverage.gradle" | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.ajoberstar:gradle-jacoco:0.1.0" | |
} | |
} |
This file contains hidden or 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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1' | |
} | |
} |
This file contains hidden or 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 com.googlecode.concurrentlinkedhashmap.benchmark; | |
import com.google.caliper.Runner; | |
import com.google.caliper.SimpleBenchmark; | |
import org.testng.annotations.Parameters; | |
import org.testng.annotations.Test; | |
import java.util.Queue; | |
import java.util.concurrent.ConcurrentLinkedQueue; |