Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFLY-12165 Expose management metrics for HotRod caches #12461

Merged
merged 14 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,15 @@ public interface BinaryServiceNameFactory {
* @return a {@link ServiceName}
*/
ServiceName getServiceName(CapabilityServiceSupport support, String parent, String child);

/**
* Creates a {@link ServiceName} appropriate for the address of the specified {@link OperationContext}
* @param context an operation context
* @param resolver a capability name resolver
* @return a {@link ServiceName}
*/
default ServiceName getServiceName(OperationContext context, BinaryCapabilityNameResolver resolver) {
String[] parts = resolver.apply(context.getCurrentAddress());
return this.getServiceName(context, parts[0], parts[1]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.jboss.as.clustering.controller;

import org.jboss.as.controller.AttributeDefinition;
import org.jboss.as.controller.ExpressionResolver;
import org.jboss.as.controller.OperationDefinition;
import org.jboss.as.controller.OperationFailedException;
Expand All @@ -33,6 +34,8 @@
*/
public interface Operation<C> extends Definable<OperationDefinition> {

final AttributeDefinition[] NO_ATTRIBUTES = new AttributeDefinition[0];

default String getName() {
return this.getDefinition().getName();
}
Expand All @@ -41,6 +44,10 @@ default boolean isReadOnly() {
return this.getDefinition().getFlags().contains(OperationEntry.Flag.READ_ONLY);
}

default AttributeDefinition[] getParameters() {
return NO_ATTRIBUTES;
}

/**
* Execute against the specified context.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,15 @@ public interface UnaryServiceNameFactory {
* @return a {@link ServiceName}
*/
ServiceName getServiceName(CapabilityServiceSupport support, String name);

/**
* Creates a {@link ServiceName} appropriate for the address of the specified {@link OperationContext}
* @param context an operation context
* @param resolver a capability name resolver
* @return a {@link ServiceName}
*/
default ServiceName getServiceName(OperationContext context, UnaryCapabilityNameResolver resolver) {
String[] parts = resolver.apply(context.getCurrentAddress());
return this.getServiceName(context, parts[0]);
}
}
8 changes: 8 additions & 0 deletions clustering/infinispan/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<name>WildFly: Infinispan Client SPI</name>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-clustering-api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>wildfly-clustering-common</artifactId>
Expand All @@ -50,6 +54,10 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-query-dsl</artifactId>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
Expand Down