consider easier APIs (as extensions, maybe) to use Entry
#233
Labels
kind/enhancement
Category issues or prs related to enhancement.
Entry
#233
Issue Description
Type: feature request
Describe what happened (or what feature you want)
Please support a cleaner way to use
SphU
(I don't even know whatSphU
means - it's very confusing.).I see that Sentinel uses Java 6, but will Sentinel ever support Java 7? (or 11?)
in Java 7, it would be possible to write:
try ( Entry e = SpuH.entry("my-resource")){
// do something
}
if
Entry
implementedAutocloseable
andAutocloseable#close()
calledEntry#exit()
.In the Spring world, we use
*Template
objects to achieve this kind of resource initialization and destruction. Imagine something like:then, you could use that in consumer code somewhere:
Anything else we need to know?
thank you for open-sourcing something so cool!
The text was updated successfully, but these errors were encountered: