forked from apache/eventmesh-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
128 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
...in/java/org/apache/eventmesh/dashboard/core/metadata/cluster/AbstractMetadataHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
package org.apache.eventmesh.dashboard.core.metadata.cluster; | ||
|
||
import lombok.Setter; | ||
import org.apache.eventmesh.dashboard.common.enums.ClusterTrusteeshipType; | ||
import org.apache.eventmesh.dashboard.core.metadata.MetadataHandler; | ||
import org.apache.eventmesh.dashboard.core.remoting.RemotingManager; | ||
import org.apache.eventmesh.dashboard.core.remoting.RemotingManager.RemotingServiceContext; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public abstract class AbstractMetadataHandler<T,S,RE> implements MetadataHandler<T> ,RemotingManager.RemotingRequestWrapper<S,RE>{ | ||
|
||
import lombok.Setter; | ||
|
||
public abstract class AbstractMetadataHandler<T,S,RE> implements MetadataHandler<T> ,RemotingManager.RemotingRequestWrapper<S,RE>{ | ||
|
||
@Setter | ||
private RemotingManager remotingManager; | ||
|
||
protected S request; | ||
|
||
public void init(){ | ||
this.request = (S)remotingManager.getProxyObject(); | ||
this.request = (S)remotingManager.getMethodProxy(); | ||
} | ||
|
||
|
||
/** | ||
* 同步的时候,只同步runtime 的数据,还是会同步 storage 的数据。这个可以进行配置。 | ||
* @return | ||
*/ | ||
@Override | ||
public List<T> getData(){ | ||
List<RemotingManager.RemotingWrapper> remotingWrapperList = new ArrayList<>(); | ||
remotingWrapperList.addAll(remotingManager.getEventMeshClusterDO(ClusterTrusteeshipType.TRUSTEESHIP, ClusterTrusteeshipType.FIRE_AND_FORGET_TRUSTEESHIP)); | ||
remotingWrapperList.addAll(remotingManager.getStorageCluster(ClusterTrusteeshipType.TRUSTEESHIP, ClusterTrusteeshipType.FIRE_AND_FORGET_TRUSTEESHIP)); | ||
return remotingManager.request(this, remotingManager.getEventMeshClusterDO(ClusterTrusteeshipType.TRUSTEESHIP, ClusterTrusteeshipType.FIRE_AND_FORGET_TRUSTEESHIP)); | ||
List<RemotingServiceContext> remotingServiceContextList = new ArrayList<>(); | ||
remotingServiceContextList.addAll(remotingManager.getEventMeshClusterDO(ClusterTrusteeshipType.TRUSTEESHIP, ClusterTrusteeshipType.FIRE_AND_FORGET_TRUSTEESHIP)); | ||
remotingServiceContextList.addAll(remotingManager.getStorageCluster(ClusterTrusteeshipType.TRUSTEESHIP, ClusterTrusteeshipType.FIRE_AND_FORGET_TRUSTEESHIP)); | ||
return remotingManager.request(this, remotingServiceContextList); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.