Tabnine Logo
ConcurrencyFailureException
Code IndexAdd Tabnine to your IDE (free)

How to use
ConcurrencyFailureException
in
org.springframework.dao

Best Java code snippets using org.springframework.dao.ConcurrencyFailureException (Showing top 20 results out of 315)

origin: spring-projects/spring-framework

return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
origin: spring-projects/spring-framework

assertEquals(tranRollbackEx, cfex.getCause());
origin: omero/server

ConcurrencyException ce = new ConcurrencyException(cfe.getMessage(), 500);
ce.setStackTrace(t.getStackTrace());
printException("Unknown concurrency failure", t);
ConcurrencyException ce = new ConcurrencyException(cfe.getMessage(), 500);
ce.setStackTrace(t.getStackTrace());
printException("Unknown transient failure", t);
origin: spring-projects/spring-framework

return new ConcurrencyFailureException(buildMessage(task, sql, ex), ex);
origin: alibaba/cobarclient

private void fillResultListWithFutureResults(List<Future<Object>> futures,
                       List<Object> resultList) {
  for (Future<Object> future : futures) {
    try {
      resultList.add(future.get());
    } catch (InterruptedException e) {
      throw new ConcurrencyFailureException(
          "interrupted when processing data access request in concurrency", e);
    } catch (ExecutionException e) {
      throw new ConcurrencyFailureException("something goes wrong in processing", e);
    }
  }
}
origin: org.alfresco/alfresco-repository

@Override
public void updateAclChangeSet(Long aclChangeSetEntityId, long commitTimeMs)
{
  int updated = updateChangeSetEntity(aclChangeSetEntityId, commitTimeMs);
  if (updated != 1)
  {
    throw new ConcurrencyFailureException("Update by ID should delete exactly 1: " + aclChangeSetEntityId);
  }
}
origin: org.alfresco/alfresco-repository

@Override
protected ReadableByteChannel getDirectReadableChannel() throws ContentIOException
{
  // ALF-17708: If we got the contentdata from the transactional cache, there's a chance that eager cleaning can
  // remove the content from under our feet
  throw new ConcurrencyFailureException(getContentUrl() + " no longer exists");
}
origin: Alfresco/alfresco-repository

@Override
protected ReadableByteChannel getDirectReadableChannel() throws ContentIOException
{
  // ALF-17708: If we got the contentdata from the transactional cache, there's a chance that eager cleaning can
  // remove the content from under our feet
  throw new ConcurrencyFailureException(getContentUrl() + " no longer exists");
}
origin: org.alfresco/alfresco-repository

@Override
public void setNodeAssocIndex(Long id, int assocIndex)
{
  int updated = updateNodeAssoc(id, assocIndex);
  if (updated != 1)
  {
    throw new ConcurrencyFailureException("Expected to update exactly one row: " + id);
  }
}
origin: Alfresco/alfresco-repository

@Override
public void setNodeAssocIndex(Long id, int assocIndex)
{
  int updated = updateNodeAssoc(id, assocIndex);
  if (updated != 1)
  {
    throw new ConcurrencyFailureException("Expected to update exactly one row: " + id);
  }
}
origin: Alfresco/alfresco-repository

@Override
public void updateAclChangeSet(Long aclChangeSetEntityId, long commitTimeMs)
{
  int updated = updateChangeSetEntity(aclChangeSetEntityId, commitTimeMs);
  if (updated != 1)
  {
    throw new ConcurrencyFailureException("Update by ID should delete exactly 1: " + aclChangeSetEntityId);
  }
}
origin: org.alfresco/alfresco-repository

@Override
public Pair<Long, AssociationRef> getNodeAssoc(Long assocId)
{
  Pair<Long, AssociationRef> ret = getNodeAssocOrNull(assocId);
  if (ret == null)
  {
    throw new ConcurrencyFailureException("Assoc ID does not point to a valid association: " + assocId);
  }
  else
  {
    return ret;
  }
}
origin: Alfresco/alfresco-repository

@Override
public Pair<Long, AssociationRef> getNodeAssoc(Long assocId)
{
  Pair<Long, AssociationRef> ret = getNodeAssocOrNull(assocId);
  if (ret == null)
  {
    throw new ConcurrencyFailureException("Assoc ID does not point to a valid association: " + assocId);
  }
  else
  {
    return ret;
  }
}
origin: org.alfresco/alfresco-repository

@Override
public void deleteContentData(Long id)
{
  if (id == null)
  {
    throw new IllegalArgumentException("Cannot delete ContentData by null ID.");
  }
  int deleted = contentDataCache.deleteByKey(id);
  if (deleted < 1)
  {
    throw new ConcurrencyFailureException("ContentData with ID " + id + " no longer exists");
  }
  return;
}
origin: Alfresco/alfresco-repository

@Override
public void deleteContentData(Long id)
{
  if (id == null)
  {
    throw new IllegalArgumentException("Cannot delete ContentData by null ID.");
  }
  int deleted = contentDataCache.deleteByKey(id);
  if (deleted < 1)
  {
    throw new ConcurrencyFailureException("ContentData with ID " + id + " no longer exists");
  }
  return;
}
origin: org.alfresco/alfresco-repository

@Override
public int removeNodeAssocs(List<Long> ids)
{
  int toDelete = ids.size();
  if (toDelete == 0)
  {
    return 0;
  }
  int deleted = deleteNodeAssocs(ids);
  if (toDelete != deleted)
  {
    throw new ConcurrencyFailureException("Deleted " + deleted + " but expected " + toDelete);
  }
  return deleted;
}
origin: Alfresco/alfresco-repository

  public Long execute() throws Throwable
  {
    callCount++;
    Long checkValue = incrementCheckValue();
    if (callCount == maxCalls)
    {
      return checkValue;
    }
    else
    {
      throw new ConcurrencyFailureException("Testing");
    }
  }
};
origin: Alfresco/alfresco-repository

@Override
public int removeNodeAssocs(List<Long> ids)
{
  int toDelete = ids.size();
  if (toDelete == 0)
  {
    return 0;
  }
  int deleted = deleteNodeAssocs(ids);
  if (toDelete != deleted)
  {
    throw new ConcurrencyFailureException("Deleted " + deleted + " but expected " + toDelete);
  }
  return deleted;
}
origin: org.alfresco/alfresco-repository

@Override
public void deleteTenant(String tenantDomain)
{
  ParameterCheck.mandatoryString("tenantDomain", tenantDomain);
  
  // force lower-case on delete
  tenantDomain = tenantDomain.toLowerCase();
  
  int deleted = tenantEntityCache.deleteByKey(tenantDomain);
  if (deleted < 1)
  {
    throw new ConcurrencyFailureException("TenantEntity " + tenantDomain + " no longer exists");
  }
}
 
origin: Alfresco/alfresco-repository

@Override
public void deleteTenant(String tenantDomain)
{
  ParameterCheck.mandatoryString("tenantDomain", tenantDomain);
  
  // force lower-case on delete
  tenantDomain = tenantDomain.toLowerCase();
  
  int deleted = tenantEntityCache.deleteByKey(tenantDomain);
  if (deleted < 1)
  {
    throw new ConcurrencyFailureException("TenantEntity " + tenantDomain + " no longer exists");
  }
}
 
org.springframework.daoConcurrencyFailureException

Javadoc

Exception thrown on concurrency failure.

This exception should be subclassed to indicate the type of failure: optimistic locking, failure to acquire lock, etc.

Most used methods

  • <init>
    Constructor for ConcurrencyFailureException.
  • getCause
  • getMessage

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now