com.plucker.plucker 1.0-SNAPSHOT
Install 1/2: Add this to pom.xml:
Learn more about Maven or Gradle
<dependency>
<groupId>com.plucker</groupId>
<artifactId>plucker</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
Install 2/2: Run via command line
$ mvn install
About this package
This was design basically as a research project to understand how java annotation works, and it worked out pretty well so i released it as a library, Google Guava already works very well for caches so i used it for that purpose and not some Weak/Soft Reference Map.
Next version would be the one with Java Instrumentation API, which is wayy more fun since you work with byte code and bytecode injection.
@Cached(duration = 1, durationUnit = TimeUnit.HOURS, maximumSize = 10000L)
public Map<String, Object> methodThatTakesTooMuchTime(String objId) throws InterruptedException {
final Map<String, Object> stringObjectMap = Collections.synchronizedMap(new HashMap<String, Object>());
stringObjectMap.put("name", "steve");
stringObjectMap.put("data", new HashSet<String>() {{
add("one");
add("two");
}});
TimeUnit.SECONDS.sleep(3);
return stringObjectMap;
}
Details
-
dushmis
- August 22, 2020
- 2 dependencies
- Apache License 2.0
Assets
Download activity
- Total downloads 1
- Last 30 days 0
- Last week 0
- Today 0
Recent versions
-
1.1-SNAPSHOT
Mar 16, 2024 -
1.0-SNAPSHOT
Aug 22, 2020