org.apache.struts2

## Class ServletCache

- java.lang.Object
- - org.apache.struts2.ServletCache

-     public class ServletCache
      extends Object

  Caches servlet instances by jsp location. If a requested jsp is not in the cache, "get" will block and wait for the jsp to be loaded

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ConcurrentMap<String,Future<javax.servlet.Servlet>>` | `cache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServletCache()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `javax.servlet.Servlet` | `get(String location)`
    `static RuntimeException` | `launderThrowable(Throwable t)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cache

          protected final ConcurrentMap<String,Future<javax.servlet.Servlet>> cache

  - ### Constructor Detail

    - #### ServletCache

          public ServletCache()

  - ### Method Detail

    - #### clear

          public void clear()

    - #### get

          public javax.servlet.Servlet get(String location)
                                    throws InterruptedException

      Throws:
        `InterruptedException`

    - #### launderThrowable

          public static RuntimeException launderThrowable(Throwable t)

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.