Gets all counter names for the specified entity.
@param instance Instance
@param <T> Instance class
@return All counters names
176839
public <T> List<String> getCountersFor(T instance) {
        if (instance == null) {
            throw new IllegalArgumentException("Instance cannot be null");
        }

        DocumentInfo documentInfo = getDocumentInfo(instance);

        ArrayNode countersArray = (ArrayNode) documentInfo.getMetadata().get(Constants.Documents.Metadata.COUNTERS);
        if (countersArray == null) {
            return null;
        }

        return IntStream.range(0, countersArray.size())
                .mapToObj(i -> countersArray.get(i).asText())
                .collect(Collectors.toList());
    }
1109794
public java.util.List<com.google.appengine.v1.Instance> getInstancesList() {
    return instances_;
  }
743919
public com.google.appengine.v1.Instance getInstances(int index) {
    return instances_.get(index);
  }
437518
@Override
	public List<CounterSample> getCounterSamples(String namePattern) {
		List<CounterSample> counterSamples = new ArrayList<>();
		for (Simon simon : manager.getSimons(SimonPattern.createForCounter(namePattern))) {
			counterSamples.add(sampleCounter(simon));
		}
		return counterSamples;
	}
353319
@Deprecated
  public com.google.bigtable.admin.v2.InstanceName getInstanceName() {
    return com.google.bigtable.admin.v2.InstanceName.of(projectId, instanceId);
  }
1116500
public static This getClassInstanceThis(Object instance, String className) {
        try {
            Object o = getObjectFieldValue(instance, BSHTHIS + className);
            return (This) Primitive.unwrap(o); // unwrap Primitive.Null to null
        } catch (Exception e) {
            throw new InterpreterError("Generated class: Error getting This" + e, e);
        }
    }
579382
public long countClass(final String iClassName) {
    final OClass cls = getMetadata().getSchema().getClass(iClassName);

    if (cls == null)
      throw new IllegalArgumentException("Class '" + iClassName + "' not found in database");

    return cls.count();
  }
1334381
public <T> List<T> getInstances(Class<T> type) {
		return getInstances(Key.get(type));
	}
265466
public java.util.List<String> getInstancesToTerminate() {
        if (instancesToTerminate == null) {
            instancesToTerminate = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instancesToTerminate;
    }
46840
protected List<Object> onCounterColumn(EntityMetadata m, boolean isRelation, List<String> relations,
        List<KeySlice> ks) {
        List<Object> entities;

        if (m.getType().isSuperColumnFamilyMetadata()) {
            if (log.isInfoEnabled()) {
                log.info("On counter column for super column family of entity {}.", m.getEntityClazz());
            }

            // TODO:: change it. remove column or super column helper
            Map<byte[], List<CounterSuperColumn>> results = new HashMap<byte[], List<CounterSuperColumn>>();

            List<CounterSuperColumn> counterColumns = null;
            for (KeySlice slice : ks) {
                counterColumns = new ArrayList<CounterSuperColumn>(slice.getColumnsSize());
                for (ColumnOrSuperColumn column : slice.columns) {
                    counterColumns.add(column.counter_super_column);
                }

                results.put(slice.getKey(), counterColumns);
            }

            entities = new ArrayList<Object>(results.size());

            for (byte[] key : results.keySet()) {
                Object e = null;
                Object id = PropertyAccessorHelper.getObject(m.getIdAttribute().getJavaType(), key);
                List<CounterSuperColumn> counterSuperColumns = results.get(key);
                ThriftRow tr = new ThriftRow(id, m.getTableName(), new ArrayList<Column>(0),
                    new ArrayList<SuperColumn>(0), new ArrayList<CounterColumn>(0), counterSuperColumns);
                e = getDataHandler().populateEntity(tr, m, KunderaCoreUtils.getEntity(e), relations, isRelation);
                entities.add(e);
            }
        } else {
            if (log.isInfoEnabled()) {
                log.info("On counter column for column family of entity {}", m.getEntityClazz());
            }

            Map<byte[], List<CounterColumn>> results = new HashMap<byte[], List<CounterColumn>>();

            List<CounterColumn> counterColumns = null;

            for (KeySlice slice : ks) {
                counterColumns = new ArrayList<CounterColumn>(slice.getColumnsSize());
                for (ColumnOrSuperColumn column : slice.columns) {
                    counterColumns.add(column.counter_column);
                }

                results.put(slice.getKey(), counterColumns);
            }

            entities = new ArrayList<Object>(results.size());

            for (byte[] key : results.keySet()) {
                Object e = null;
                Object id = PropertyAccessorHelper.getObject(m.getIdAttribute().getJavaType(), key);

                List<CounterColumn> columns = results.get(key);
                ThriftRow tr = new ThriftRow(id, m.getTableName(), new ArrayList<Column>(0),
                    new ArrayList<SuperColumn>(0), columns, new ArrayList<CounterSuperColumn>(0));
                e = getDataHandler().populateEntity(tr, m, KunderaCoreUtils.getEntity(e), relations, isRelation);

                if (e != null) {
                    entities.add(e);
                }
            }
        }
        return entities;
    }
67165
private void printServiceInstance(ServiceInstance instance) {
        print("\nServiceInstance\n-------------------------");
        if (instance == null) {
            print("null");
            return;
        }
        print("serviceName:  " + instance.getServiceName());
        print("status:  " + instance.getStatus());
        print("uri:  " + instance.getUri());
        print("address:  " + instance.getAddress());
        print("monitorEnabled:  " + instance.isMonitorEnabled());
        print("metadata:");
        Map<String, String> meta = instance.getMetadata();
        for (Entry<String, String> entry : meta.entrySet()) {
            print("  " + entry.getKey() + "  =>  " + entry.getValue());
        }
    }
561488
private <T extends IEntity> String getEntityName(T entity) {
		if (entity != null) {
			return entity.getClass().getSimpleName().toLowerCase();
		}
		return null;
	}
99563
Long getCounterValueAsLong(final CounterMap counters, final String counterGroupName,
      final String counterName) {
    Counter c1 = counters.getCounter(counterGroupName, counterName);
    if (c1 != null) {
      return c1.getValue();
    } else {
      return 0L;
    }
  }
150406
def allinstances(cls):
        
        JB_Gui._allinstances = weakref.WeakSet([i for i in cls._allinstances if shiboken.isValid(i)])
        return list(cls._allinstances)
757352
public List<Tag> getInstanceTags() {
    final DescribeInstancesResult response = ec2
        .describeInstances(new DescribeInstancesRequest()
            .withInstanceIds(Collections.singletonList(instanceIdentity.instanceId)));

    return response.getReservations().stream()
        .flatMap(reservation -> reservation.getInstances().stream())
        .flatMap(instance -> instance.getTags().stream())
        .collect(Collectors.toList());

  }
941516
public java.util.List<InstanceProfile> getInstanceProfileList() {
        if (instanceProfileList == null) {
            instanceProfileList = new com.amazonaws.internal.SdkInternalList<InstanceProfile>();
        }
        return instanceProfileList;
    }
780269
public static String buildTopicNameForAgent( Instance instance ) {
		Instance scopedInstance = InstanceHelpers.findScopedInstance( instance );
		return buildTopicNameForAgent( InstanceHelpers.computeInstancePath( scopedInstance ));
	}