簡體   English   中英

Gemfire / Gemstone gfsh區域緩存偵聽器

[英]Gemfire/gemstone gfsh region cache listener

我正在嘗試使用以下命令通過gfsh創建具有定義的緩存偵聽器的區域:

gfsh>create region --name=exampleRegion --type=REPLICATE --enable-statistics=true --cache-listener=com.example.RegionChangeListener

com.example.RegionChangeListener類已在jar內部署( >deploy --jar=lib.jar ),但似乎無法正常工作-我得到:

Could not process command due to GemFire error. java.lang.ClassNotFoundException cannot be cast to com.gemstone.gemfire.management.internal.cli.functions.CliFunctionResult

好像沒有找到/識別該類-哪里以及如何“注冊”它,以便gemfire可以正確初始化它? 該類僅擴展CacheListenerAdapter並實現Declarable。

>deploy --jar=僅用於部署函數 ,而不用於事件處理程序,如偵聽器,加載器或編寫器。

改為這樣做:

gfsh>create region --cp=<path to cache listener jar> --name=exampleRegion --type=REPLICATE --enable-statistics=true --cache-listener=com.example.RegionChangeListener

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM