Detaches a disk from this instance.

@return a zone operation if the detach request was issued correctly, {@code null} if the
instance was not found
@throws ComputeException upon failure
182446
public Operation detachDisk(String deviceName, OperationOption... options) {
    return compute.detachDisk(getInstanceId(), deviceName, options);
  }
1254257
Instance getNearestGCRootPointer(Instance instance) {
        if (heap.getGCRoot(instance) != null) {
            return instance;
        }
        computeGCRoots();
        long nextGCPathId = heap.idToOffsetMap.get(instance.getInstanceId()).getNearestGCRootPointer();
        return heap.getInstanceByID(nextGCPathId);
    }
85906
public synchronized SlabRef detach() {
        if (!isAttached()) {
            return null;
        }

        // Pass ownership of the slab ref to the caller.  No need to call slab.release().
        SlabRef slab = _slab;
        _slab = null;
        _slabExpiresAt = 0;
        return slab;
    }
628861
@Override
    public com.ibm.websphere.cache.CacheEntry getEntryDisk(Object cacheId) {
        final String methodName = "getEntryDisk()";
        CacheEntry ce = null;
        if (this.swapToDisk) {
            // TODO write code to support getEntryDisk function
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it is not implemented yet");
            }
        } else {
            if (this.featureSupport.isDiskCacheSupported() == false) {
                Tr.error(tc, "DYNA1064E", new Object[] { methodName, cacheName, this.cacheProviderName });
            } else {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, methodName + " cacheName=" + cacheName + " no operation is done because the disk cache offload is not enabled");
                }
            }
        }
        return ce;
    }
996439
public Operation attachDisk(
      PersistentDiskConfiguration configuration, OperationOption... options) {
    return compute.attachDisk(getInstanceId(), configuration, options);
  }
1342163
public O removeObject(O e) {
    int pos = index.getInt(e);
    return (pos >= 0) ? removeAt(pos) : null;
  }
1197696
public T get(String key) {

        Object ramResult = null;
        String diskResult = null;
        DiskLruCache.Snapshot snapshotObject = null;

        // Try to get the object from RAM.
        boolean isRamSerialized = ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER);
        boolean isRamReferenced = ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE);
        if (isRamSerialized || isRamReferenced) {
            ramResult = ramCacheLru.get(key);
        }

        if (ramResult == null) {
            // Try to get the cached object from disk.
            loggerHelper.logEntryForKeyIsNotInRam(key);
            if (diskMode.equals(DualCacheDiskMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                try {
                    dualCacheLock.lockDiskEntryWrite(key);
                    snapshotObject = diskLruCache.get(key);
                } catch (IOException e) {
                    logger.logError(e);
                } finally {
                    dualCacheLock.unLockDiskEntryWrite(key);
                }

                if (snapshotObject != null) {
                    loggerHelper.logEntryForKeyIsOnDisk(key);
                    try {
                        diskResult = snapshotObject.getString(0);
                    } catch (IOException e) {
                        logger.logError(e);
                    }
                } else {
                    loggerHelper.logEntryForKeyIsNotOnDisk(key);
                }
            }

            T objectFromStringDisk = null;

            if (diskResult != null) {
                // Load object, no need to check disk configuration since diskresult != null.
                objectFromStringDisk = diskSerializer.fromString(diskResult);

                // Refresh object in ram.
                if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE)) {
                    if (diskMode.equals(DualCacheDiskMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                        ramCacheLru.put(key, objectFromStringDisk);
                    }
                } else if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                    if (diskSerializer == ramSerializer) {
                        ramCacheLru.put(key, diskResult);
                    } else {
                        ramCacheLru.put(key, ramSerializer.toString(objectFromStringDisk));
                    }
                }
                return objectFromStringDisk;
            }
        } else {
            loggerHelper.logEntryForKeyIsInRam(key);
            if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE)) {
                return (T) ramResult;
            } else if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                return ramSerializer.fromString((String) ramResult);
            }
        }

        // No data is available.
        return null;
    }
919940
public PaymentMethod detach(RequestOptions options) throws StripeException {
    return detach((Map<String, Object>) null, options);
  }
861007
public static DiskTypeId of(String zone, String type) {
    return of(ZoneId.of(null, zone), type);
  }
1353989
ComputeService jcloudContext( Map<String,String> targetProperties ) throws TargetException {

		validate( targetProperties );
		ComputeServiceContext context = ContextBuilder
				.newBuilder( targetProperties.get( PROVIDER_ID ))
				.endpoint( targetProperties.get( ENDPOINT ))
				.credentials( targetProperties.get( IDENTITY ), targetProperties.get( CREDENTIAL ))
				.buildView( ComputeServiceContext.class );

		return context.getComputeService();
	}
1366141
@Override
    public void deleteServerLease(final String recoveryIdentity) throws Exception {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "deleteServerLease", new Object[] { recoveryIdentity, this });

        // Is a lease file (equivalent to a record in the DB table) available for deletion
        final File leaseFile = new File(_serverInstallLeaseLogDir + String.valueOf(File.separatorChar) + recoveryIdentity);

        // At this point we are ready to acquire a lock on the control file prior to attempting to delete the server's file.
        FileLock lock = null;
        FileChannel channel = AccessController.doPrivileged(new PrivilegedAction<FileChannel>() {
            @Override
            public FileChannel run() {
                FileChannel theChannel = null;
                try {
                    theChannel = new RandomAccessFile(_controlFile, "rw").getChannel();
                } catch (FileNotFoundException e) {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "Caught FileNotFound exception when trying to lock control file");
                    theChannel = null;
                }
                return theChannel;
            }
        });

        try {
            // Block until we can acquire the lock on the control file.
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Block until we acquire the lock on the control file");
            lock = channel.lock();

            if (lock != null) {
                // Delete the leaseFile
                AccessController.doPrivileged(new PrivilegedAction<Void>() {
                    @Override
                    public Void run() {
                        boolean success = false;

                        try {
                            // If we are about to delete a peer lease file, then do a check to be sure that a new instance
                            // of the peer has not "recently" started.
                            boolean attemptDelete = true;
                            if (!recoveryIdentity.equals(_localRecoveryIdentity)) {
                                final long leaseTime = leaseFile.lastModified();

                                if (tc.isDebugEnabled()) {
                                    Tr.debug(tc, "recoveryId: " + recoveryIdentity + ", leaseTime: " + leaseTime);
                                }

                                PeerLeaseData pld = new PeerLeaseData(recoveryIdentity, leaseTime, _leaseTimeout);
                                if (!pld.isExpired()) {
                                    if (tc.isDebugEnabled())
                                        Tr.debug(tc, "The lease file has not expired, do not attempt deletion");
                                    attemptDelete = false;
                                }
                            }

                            // Attempt to delete the lease file
                            if (attemptDelete) {
                                if (tc.isDebugEnabled())
                                    Tr.debug(tc, "Attempt to delete file " + leaseFile.getName() + ", in dir " + _serverInstallLeaseLogDir);
                                success = leaseFile.delete();
                                if (success) {
                                    if (tc.isDebugEnabled())
                                        Tr.debug(tc, "Successfully deleted lease file");
                                } else {
                                    if (tc.isDebugEnabled())
                                        Tr.debug(tc, "Failed to delete lease file");
                                }
                            }
                        } catch (SecurityException se) {
                            if (tc.isDebugEnabled())
                                Tr.debug(tc, "Caught SecurityException " + se);
                        }
                        return null;
                    }
                });

            }
        } catch (OverlappingFileLockException e) {
            // File is already locked in this thread or virtual machine, We're not expecting this to happen. Log the event
            if (tc.isDebugEnabled())
                Tr.debug(tc, "The control file aleady appears to be locked in another thread");
        } catch (IOException e) {
            // We're not expecting this to happen. Log the event
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Caught an IOException");
        } finally {
            // Release the lock - if it is not null!
            if (lock != null) {
                lock.release();
            }
            // Close the channel
            channel.close();
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "deleteServerLease", this);
    }
1321182
@Override
  public V remove(Object o) {
    checkMutable();
    @SuppressWarnings("unchecked")
    final K key = (K) o;
    final int index = binarySearchInArray(key);
    if (index >= 0) {
      return removeArrayEntryAt(index);
    }
    // overflowEntries might be Collections.unmodifiableMap(), so only
    // call remove() if it is non-empty.
    if (overflowEntries.isEmpty()) {
      return null;
    } else {
      return overflowEntries.remove(key);
    }
  }
1315917
public OperationFuture<Server> removeSecondaryNetwork(Server server, Network network) {
        ServerMetadata serverMetadata = findByRef(server);

        NetworkLink link = client.removeSecondaryNetwork(
            idByRef(server),
            networkIdByRef(network, serverMetadata.getLocationId())
        );

        return new OperationFuture<>(
            server,
            link.getOperationId(),
            experimentalQueueClient
        );
    }
35711
public OperationFuture<Server> delete(Server server) {
        BaseServerResponse response = client.delete(idByRef(server));

        return new OperationFuture<>(
            server,
            response.findStatusId(),
            queueClient
        );
    }
237887
@Override
    public final T remove() {
        // Short circuit using read-lock
        if (this.isEmpty()) {
            throw new NoSuchElementException();
        }

        final T e = this.poll();
        if (e == null) {
            throw new NoSuchElementException();
        }
        return e;
    }
607945
public KNXNetworkLink detach()
	{
		// if we synchronize on method we would take into account
		// a worst case blocking of response timeout seconds
		synchronized (lnkListener) {
			// wait of response time seconds
			if (detached)
				return null;
			detached = true;
		}
		lnk.removeLinkListener(lnkListener);
		fireDetached();
		logger.info("detached from " + lnk.getName());
		LogManager.getManager().removeLogService(logger.getName());
		return lnk;
	}
1202220
public boolean remove() {
		try {
			if(!isBinary)return getJedisCommands(groupName).del(key) == 1;
			if(isCluster(groupName)){
				return getBinaryJedisClusterCommands(groupName).del(keyBytes) == 1;
			}
			return getBinaryJedisCommands(groupName).del(keyBytes) == 1;
		} finally {
			getJedisProvider(groupName).release();
		}
	}