ServiceInstanceJVMMemory.java 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

19
package org.apache.skywalking.oap.server.core.source;
20

21 22
import lombok.Getter;
import lombok.Setter;
23

24
import static org.apache.skywalking.oap.server.core.source.DefaultScopeDefine.SERVICE_INSTANCE_CATALOG_NAME;
wu-sheng's avatar
wu-sheng 已提交
25 26
import static org.apache.skywalking.oap.server.core.source.DefaultScopeDefine.SERVICE_INSTANCE_JVM_MEMORY;

27
@ScopeDeclaration(id = SERVICE_INSTANCE_JVM_MEMORY, name = "ServiceInstanceJVMMemory", catalog = SERVICE_INSTANCE_CATALOG_NAME)
wu-sheng's avatar
wu-sheng 已提交
28
@ScopeDefaultColumn.VirtualColumnDefinition(fieldName = "entityId", columnName = "entity_id", isID = true, type = String.class)
29
public class ServiceInstanceJVMMemory extends Source {
30 31
    @Override
    public int scope() {
wu-sheng's avatar
wu-sheng 已提交
32
        return DefaultScopeDefine.SERVICE_INSTANCE_JVM_MEMORY;
彭勇升 pengys 已提交
33
    }
34

35 36
    @Override
    public String getEntityId() {
wu-sheng's avatar
wu-sheng 已提交
37 38 39
        return String.valueOf(id);
    }

40 41
    @Getter
    @Setter
42
    private String id;
43 44
    @Getter
    @Setter
45
    @ScopeDefaultColumn.DefinedByField(columnName = "name", requireDynamicActive = true)
46 47 48
    private String name;
    @Getter
    @Setter
49
    @ScopeDefaultColumn.DefinedByField(columnName = "service_name", requireDynamicActive = true)
50 51 52 53
    private String serviceName;
    @Getter
    @Setter
    @ScopeDefaultColumn.DefinedByField(columnName = "service_id")
54
    private String serviceId;
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
    @Getter
    @Setter
    private boolean heapStatus;
    @Getter
    @Setter
    private long init;
    @Getter
    @Setter
    private long max;
    @Getter
    @Setter
    private long used;
    @Getter
    @Setter
    private long committed;
70
}