EvictionMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
PartitionHandlingMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
CacheContainerMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
CacheMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
LockingMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
ClusteredCacheMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
StoreMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
TransactionMetric(String name, ModelType type) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime().build(); }
ChannelMetric(String name, ModelType type, JGroupsModel deprecation) { SimpleAttributeDefinitionBuilder builder = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime(); if (deprecation != null) { builder.setDeprecated(deprecation.getVersion()); } this.definition = builder.build(); }
public static List<AttributeDefinition> getAttributesFromPlugin(StatisticsPlugin plugin) { LinkedList<AttributeDefinition> result = new LinkedList<>(); for (String name : plugin.getNames()) { ModelType modelType = ModelType.STRING; if (plugin.getType(name) == int.class) { modelType = ModelType.INT; } if (plugin.getType(name) == long.class) { modelType = ModelType.LONG; } SimpleAttributeDefinition attribute = new SimpleAttributeDefinitionBuilder(name, modelType) .setRequired(false) .setStorageRuntime() .build(); result.add(attribute); } return result; }
DeprecatedAttribute(String name, ModelType type, JGroupsModel deprecation) { this.definition = new SimpleAttributeDefinitionBuilder(name, type, true).setDeprecated(deprecation.getVersion()).setStorageRuntime().build(); }
private ResourceDefinition createProtocolResourceDefinition(String protocolName, Class<? extends Protocol> protocolClass) { SimpleResourceDescriptionResolver resolver = new SimpleResourceDescriptionResolver(protocolName, protocolClass.getSimpleName()); ResourceBuilder builder = ResourceBuilder.Factory.create(ProtocolResourceDefinition.pathElement(protocolName), resolver).setRuntime(); ProtocolMetricsHandler handler = new ProtocolMetricsHandler(this); for (Map.Entry<String, Attribute> entry: ProtocolMetricsHandler.findProtocolAttributes(protocolClass).entrySet()) { String name = entry.getKey(); Attribute attribute = entry.getValue(); FieldType type = FieldType.valueOf(attribute.getType()); resolver.addDescription(name, attribute.getDescription()); builder.addMetric(new SimpleAttributeDefinitionBuilder(name, type.getModelType(), true).setStorageRuntime().build(), handler); } return builder.build(); }
String name = attribute.getName(); FieldType type = FieldType.valueOf(attribute.getType()); registration.registerMetric(new SimpleAttributeDefinitionBuilder(name, type.getModelType()).setStorageRuntime().build(), handler);
private static SimpleAttributeDefinition createAttribute(String name, ModelType type, boolean nillable) { return new SimpleAttributeDefinitionBuilder(name, type, nillable) .setStorageRuntime() .build(); }
private static SimpleAttributeDefinition createAttribute(String name, ModelType type, boolean nillable) { return new SimpleAttributeDefinitionBuilder(name, type, nillable) .setStorageRuntime() .build(); }
private static AttributeDefinition createAttributeDefinition(String name, ModelType type) { return SimpleAttributeDefinitionBuilder.create(name, type) .setStorageRuntime() .setRuntimeServiceNotRequired() .build(); }
private static AttributeDefinition createAttributeDefinition(String name, ModelType type) { return SimpleAttributeDefinitionBuilder.create(name, type) .setStorageRuntime() .setRuntimeServiceNotRequired() .build(); }
ChannelMetric(String name, ModelType type, JGroupsModel deprecation) { SimpleAttributeDefinitionBuilder builder = new SimpleAttributeDefinitionBuilder(name, type, true).setStorageRuntime(); if (deprecation != null) { builder.setDeprecated(deprecation.getVersion()); } this.definition = builder.build(); }
private static AttributeDefinition getContentAttributeDefinition(final ParameterValidator contentValidator) { return SimpleAttributeDefinitionBuilder.create(ModelDescriptionConstants.CONTENT, ModelType.OBJECT) .setStorageRuntime() .setRuntimeServiceNotRequired() .setValidator(contentValidator) .build(); } }
private static AttributeDefinition createAttributeDefinition(String name, ModelType type, AccessConstraintDefinition... accessConstraints) { SimpleAttributeDefinitionBuilder builder = SimpleAttributeDefinitionBuilder.create(name, type) .setStorageRuntime() .setRuntimeServiceNotRequired(); if (accessConstraints != null) { for (AccessConstraintDefinition acd : accessConstraints) { builder = builder.addAccessConstraint(acd); } } return builder.build(); }