Class GlueCacheClearServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.poscoict.glueframework.cache.remote.GlueCacheClearServlet
- All Implemented Interfaces:
GlueCacheEventReceiver,Servlet,ServletConfig,Serializable
GlueCacheClearServlet[CacheEventReceiver]는 cache event를 수신하여, cacheManager의 cache data를 삭제하는 Servlet이다.
web.xml 파일 내용
<servlet>
<servlet-name>cache</servlet-name>
<servlet-class>com.poscoict.glueframework.cache.remote.GlueCacheClearServlet</servlet-class>
<init-param>
<param-name>UD_SC_SUCCESS</param-name>
<param-value>700</param-value>
</init-param>
<init-param>
<param-name>UD_SC_FAILURE</param-name>
<param-value>800</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cache</servlet-name>
<url-pattern>*.cache</url-pattern>
</servlet-mapping>
url & parameter
http://{ip}:{port}/{context-root}/cache.remove
__region_name__, __cache_key__, __requestor__ 로
com.poscoict.glueframework.cache.remote.GlueCacheEvent 의 생성자값으로 사용함.
init-param
GlueCacheClearServlet servlet의 init-param은 다음과 같다.
- UD_SC_SUCCESS : HttpResponse 정상 상태코드 정의, default 700
- UD_SC_FAILURE : HttpResponse 에러 상태코드 정의, default 800
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected GlueCacheEventProcessorgetter method.voidinit(ServletConfig config) intremoveCachedObject(String region, String key) intremoveCachedObject(String region, String[] keys) protected voidservice(HttpServletRequest request, HttpServletResponse response) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
GlueCacheClearServlet
public GlueCacheClearServlet()
-
-
Method Details
-
getCacheEventProcessor
getter method.- Returns:
- GlueCacheEventProcessor
-
init
- Specified by:
initin interfaceServlet- Overrides:
initin classHttpServlet- Throws:
ServletException
-
service
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException - Overrides:
servicein classHttpServlet- Throws:
ServletExceptionIOException
-
destroy
public void destroy()- Specified by:
destroyin interfaceServlet- Overrides:
destroyin classGenericServlet
-
removeCachedObject
- Specified by:
removeCachedObjectin interfaceGlueCacheEventReceiver
-
removeCachedObject
- Specified by:
removeCachedObjectin interfaceGlueCacheEventReceiver
-