Class UploadTempFiles
- All Implemented Interfaces:
org.apache.pekko.actor.Extension
Temporary files for uploads that the application may never consume.
The files are collected in a directory of their own, one per actor system, that a CoordinatedShutdown task
removes in the actor-system-terminate phase — after in-flight requests have been drained, matching the ordering
that File.deleteOnExit provided (its hook runs only after all application shutdown hooks have finished; a raw
Runtime.addShutdownHook would run concurrently with the drain and could delete files that requests still use).
Registering every file with deleteOnExit instead would keep its path in a JVM-wide set for the lifetime of the
process, also long after the file itself has been deleted, so that a long-running server accepting uploads would
slowly grow its heap.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tapply(org.apache.pekko.actor.ActorSystem system) static Tapply(org.apache.pekko.actor.ClassicActorSystemProvider system) create()static UploadTempFilescreateExtension(org.apache.pekko.actor.ExtendedActorSystem system) static final booleanstatic Tget(org.apache.pekko.actor.ActorSystem system) static Tget(org.apache.pekko.actor.ClassicActorSystemProvider system) static final inthashCode()
-
Constructor Details
-
UploadTempFiles
public UploadTempFiles(org.apache.pekko.actor.ExtendedActorSystem system)
-
-
Method Details
-
createExtension
-
apply
public static T apply(org.apache.pekko.actor.ActorSystem system) -
apply
public static T apply(org.apache.pekko.actor.ClassicActorSystemProvider system) -
get
public static T get(org.apache.pekko.actor.ActorSystem system) -
get
public static T get(org.apache.pekko.actor.ClassicActorSystemProvider system) -
hashCode
public static final int hashCode() -
equals
-
create
-