Remove expired cache statement.

@param statementId statement ID
181866
public synchronized void remove(final int statementId) {
        MySQLBinaryStatement binaryStatement = getBinaryStatement(statementId);
        if (null != binaryStatement) {
            statementIdAssigner.remove(binaryStatement.getSql());
            binaryStatements.remove(statementId);
        }
    }
167742
@Override
	public void removeByCPDefinitionId(long CPDefinitionId) {
		for (CPDefinitionGroupedEntry cpDefinitionGroupedEntry : findByCPDefinitionId(
				CPDefinitionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionGroupedEntry);
		}
	}
407947
@Override
	public void removeByCommerceNotificationQueueEntryId(
		long commerceNotificationQueueEntryId) {
		for (CommerceNotificationAttachment commerceNotificationAttachment : findByCommerceNotificationQueueEntryId(
				commerceNotificationQueueEntryId, QueryUtil.ALL_POS,
				QueryUtil.ALL_POS, null)) {
			remove(commerceNotificationAttachment);
		}
	}
1275024
public void removePath(int pathId) {
        PreparedStatement statement = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            // remove any enabled overrides with this path
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                    " WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + " = ?"
            );
            statement.setInt(1, pathId);
            statement.executeUpdate();
            statement.close();

            // remove path
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_PATH
                    + " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setInt(1, pathId);
            statement.executeUpdate();
            statement.close();

            //remove path from responseRequest
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_REQUEST_RESPONSE
                    + " WHERE " + Constants.REQUEST_RESPONSE_PATH_ID + " = ?"
            );
            statement.setInt(1, pathId);
            statement.executeUpdate();
            statement.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
999251
protected void removeExistingEntity(String localId) {
		if (StringUtils.isEmpty(localId))
			return;
		List<Scope> scopes = projectRepo.getScopeIdById(localId);

		if (CollectionUtils.isEmpty(scopes))
			return;

		ObjectId tempEntId = scopes.get(0).getId();
		if (localId.equalsIgnoreCase(scopes.get(0).getpId())) {
			projectRepo.delete(tempEntId);
		}
	}
340392
public synchronized void removeSessionLogs(SessionId sessionId) {
    if (storeLogsOnSessionQuit) {
      return;
    }
    ThreadKey threadId = sessionToThreadMap.get(sessionId);
    SessionId sessionIdForThread = threadToSessionMap.get(threadId);
    if (threadId != null && sessionIdForThread != null && sessionIdForThread.equals(sessionId)) {
      threadToSessionMap.remove(threadId);
      sessionToThreadMap.remove(sessionId);
    }
    perSessionRecords.remove(sessionId);
    logFileRepository.removeLogFile(sessionId);
  }
94117
public void remove(Identity oid)
    {
        try
        {
            jcsCache.remove(oid.toString());
        }
        catch (CacheException e)
        {
            throw new RuntimeCacheException(e.getMessage());
        }
    }
1148187
@Override
  public void delete(DBIDRef id) {
    assert(!ids.contains(id));
    if(content instanceof WritableDoubleDataStore) {
      ((WritableDoubleDataStore) content).delete(id);
    }
  }
295753
public final void removeExpired() {
		mapLock.lock();
		Iterator<Entry<String, TimestampedCacheEntry<DOReader>>> entries = cacheMap.entrySet().iterator();
		if (entries.hasNext()) {
		    long now = System.currentTimeMillis();
		    while (entries.hasNext()) {
		        Entry<String, TimestampedCacheEntry<DOReader>> entry = entries.next();
		        TimestampedCacheEntry<DOReader> e = entry.getValue();
		        long age = e.ageAt(now);
		        if (age > (maxSeconds * 1000)) {
		            entries.remove();
		            String pid = entry.getKey();
		            LOG.debug("removing entry {} after {} milliseconds",
		                    pid, age);
		        }

		    }
		}
		mapLock.unlock();
	}
368473
void rollback(long fromTransactionId) {
        long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "rollback", fromTransactionId);
        List<Long> rolledBack = new ArrayList<>();
        while (!this.transactions.isEmpty() && this.transactions.peekLast().getTransactionId() >= fromTransactionId) {
            ContainerMetadataUpdateTransaction txn = this.transactions.removeLast();
            txn.seal();
            rolledBack.add(txn.getTransactionId());
        }

        // At this point, the transaction list is either empty or its last one is sealed; any further changes would
        // require creating a new transaction.
        LoggerHelpers.traceLeave(log, this.traceObjectId, "rollback", traceId, rolledBack);
    }
663795
@Override
	public void removeByGroupId(long groupId) {
		for (CPDefinition cpDefinition : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinition);
		}
	}
490496
void expireAfterAccess(String key, @Nullable String value) {
    requireArgument(expireAfterAccessDuration == UNSET_INT, "expireAfterAccess was already set");
    expireAfterAccessDuration = parseDuration(key, value);
    expireAfterAccessTimeUnit = parseTimeUnit(key, value);
  }
614086
public final synchronized void removeId(long id)
	{
		if (tc.isEntryEnabled()) Tr.entry(tc, "removeId", new Long(id));

		_idMap.remove(id);

		if (tc.isEntryEnabled()) Tr.exit(tc, "removeId");
	}
28172
@Override
    @Scheduled(fixedRate = REAP_INTERVAL)
    public void removeExpired() {
        final Set<String> reapable = sessions.entrySet().stream()
                .filter(e -> e.getValue().getExpires().isPresent())
                .filter(e -> e.getValue().getExpires().get().isBefore(now()))
                .map(Map.Entry::getKey).collect(toSet());
        reapable.forEach(key -> {
            final FedoraSession s = sessions.get(key);
            if (s != null) {
                try {
                    s.expire();
                } catch (final RepositoryRuntimeException e) {
                    LOGGER.error("Got exception rolling back expired session {}: {}", s, e.getMessage());
                }
            }
            sessions.remove(key);
        });
    }
1094127
@Override
	public void removeByCPDefinitionId(long CPDefinitionId) {
		for (CPDefinitionLink cpDefinitionLink : findByCPDefinitionId(
				CPDefinitionId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpDefinitionLink);
		}
	}
1340735
private void remove(final String id, final StringBuilder sql) {
        sql.append("DELETE FROM ").append(getName()).append(" WHERE ").append(JdbcRepositories.getDefaultKeyName()).append(" = '").
                append(id).append("'");
    }
1354291
public void cleanupSession(long sessionId) {
    synchronized (mSharedMapsLock) {
      Set<Long> sessionLockIds = mSessionIdToLockIdsMap.get(sessionId);
      if (sessionLockIds == null) {
        return;
      }
      for (long lockId : sessionLockIds) {
        LockRecord record = mLockIdToRecordMap.get(lockId);
        if (record == null) {
          LOG.error(ExceptionMessage.LOCK_RECORD_NOT_FOUND_FOR_LOCK_ID.getMessage(lockId));
          continue;
        }
        Lock lock = record.getLock();
        unlock(lock, record.getBlockId());
        mLockIdToRecordMap.remove(lockId);
      }
      mSessionIdToLockIdsMap.remove(sessionId);
    }
  }