Get a single instance.

@param id The application identifier.
@return The registered application.
514995
@GetMapping(path = "/instances/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
    public Mono<ResponseEntity<Instance>> instance(@PathVariable String id) {
        LOGGER.debug("Deliver registered instance with ID '{}'", id);
        return registry.getInstance(InstanceId.of(id))
                       .filter(Instance::isRegistered)
                       .map(ResponseEntity::ok)
                       .defaultIfEmpty(ResponseEntity.notFound().build());
    }
1180606
public Resource<?> getObject(final int id) {
        return ObjectCache.from(WaylandServerCore.INSTANCE()
                                                 .wl_client_get_object(this.pointer,
                                                                       id));
    }
636629
public DesignDocument get(String id) {
        assertNotEmpty(id, "id");
        return db.find(DesignDocument.class, ensureDesignPrefix(id));
    }
1197425
public Service getServiceObjectFromId(String id) {
        log.fine("Return service object for " + id);
        Service service = null;
        for (Service s : services.getServices()) {
            if (id.equals(s.getId())) {
                return s;
            }
        }
        return service;
    }
634700
public User getUserById(int id) {
		for (User u : users)
			if (u.getId() == id)
				return u;
		return null;
	}
1014493
@GetMapping(path = "/instances", produces = MediaType.APPLICATION_JSON_VALUE, params = "name")
    public Flux<Instance> instances(@RequestParam("name") String name) {
        return registry.getInstances(name).filter(Instance::isRegistered);
    }
1295580
@VisibleForTesting
	@Nullable
	public Instance getInstance(ResourceID resourceId) {
		for (Instance instance : allInstances) {
			if (Objects.equals(resourceId, instance.getTaskManagerID())) {
				return instance;
			}
		}
		return null;
	}
1169671
public Object getObjectWithId( IdKey id ) {
        if ( null != idToObject ) {
            return idToObject.get( id );
        }
        return null;
    }
710928
public <T extends MPBase> T getById(String id) throws MPException {
        T resource = null;
        for (int i = 0; i < _resourceArray.size(); i++) {
            resource = getByIndex(i);
            try {
                Field field = resource.getClass().getDeclaredField("id");
                field.setAccessible(true);
                String resourceId = field.get(resource).toString();
                if (resourceId.equals(id)) {
                    break;
                }
            } catch (Exception exception) {
                throw new MPException(exception);
            }
        }
        return resource;
    }
101281
public InstanceId getInstanceId()
    {
        if (m_instanceId == null)
        {
            try
            {
                byte[] data =
                    m_zk.getData(CoreZK.instance_id, false, null);
                JSONObject idJSON = new JSONObject(new String(data, "UTF-8"));
                m_instanceId = new InstanceId(idJSON.getInt("coord"),
                        idJSON.getLong("timestamp"));

            }
            catch (Exception e)
            {
                String msg = "Unable to get instance ID info from " + CoreZK.instance_id;
                hostLog.error(msg);
                throw new RuntimeException(msg, e);
            }
        }
        return m_instanceId;
    }
735320
public ApplicationInstance getInstance(String nodeId) throws ApplicationInstanceOfflineException {
        if (ApplicationDiscovery.singleton == null)
            throw new RuntimeException("Service discovery is disabled! No service discovery plugin is provided.");
        ApplicationInstance instance = ApplicationDiscovery.singleton.instance(nodeId);
        if (instance == null)
            throw new ApplicationInstanceOfflineException(nodeId);
        return instance;
    }
875521
public Entity getEntity(String id) {
        Entity e = getEntities().get(id);
        if (e == null) {
            return null;
        }
        return e;
    }
1345870
public static BeanId getBeanId(final long id, UniqueIds uids) {
        final byte[] rowkey = getRowKey(id);
        final byte[] sid = new byte[] { rowkey[0], rowkey[1] };
        final byte[] iid = new byte[] { rowkey[2], rowkey[3], rowkey[4], rowkey[5] };
        final String schemaName = uids.getUsid().getName(sid);
        final String instanceId = uids.getUiid().getName(iid);
        return BeanId.create(instanceId, schemaName);
    }
970971
private UserRegistryService getUserRegistryService(String id) {
        UserRegistryService service = userRegistry.getService(id);
        if (service == null) {
            throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_USERREGISTRY_REF, id);
        }
        return service;
    }
1222843
public RegisteredService get(final long id) {
        val keys = new HashMap<String, AttributeValue>();
        keys.put(ColumnNames.ID.getColumnName(), new AttributeValue(String.valueOf(id)));
        return getRegisteredServiceByKeys(keys);
    }
1131003
static public FileId getInstance(String id) throws DaoManagerException {
		if (id!=null && FileConnector.exists(id)){
			return new FileId(id,null);
		} else {
			return null;
		}
	}
107238
def application(self, id=None, manifest=None, name=None):
        

        modify = False
        found = False

        # Try to find application by name or id
        if name and id:
            found = self.get_application(id=id)
            if not found.name == name:
                modify = True
        elif id:
            found = self.get_application(id=id)
            name = found.name
        elif name:
            try:
                found = self.get_application(name=name)
            except exceptions.NotFoundError:
                pass

        # If found - compare parameters
        if found:
            if manifest and not manifest == found.manifest:
                modify = True

        # We need to update application
        if found and modify:
            found.update(name=name, manifest=manifest)
        if not found:
            created = self.create_application(name=name, manifest=manifest)

        return found or created