Package com.linkedin.databus2.core

Examples of com.linkedin.databus2.core.DatabusException


    _maxSrcId++;

    dbName = dbName.toLowerCase(Locale.ENGLISH);

    if ( null != _idNameRegistry.getSource(srcName))
      throw new DatabusException("Source Name (" + srcName + ") already available in the schema registry !!");

    TreeSet<String> s = null;
    if (_physicalToLogicalSrcMap.containsKey(dbName))
    {
       s = _physicalToLogicalSrcMap.get(dbName);
View Full Code Here


        if ((0 == i) && (res != null))
        {
          ScnTxnPos scnTxnPos = res.getTxnPos();
          if ( (scnTxnPos != null) && (scnTxnPos.getTxnRank() <= 0))
          {
            return FilePositionResult.createErrorResult(new DatabusException("A transaction with scn less than requested SCN was not found. "
              + "Without this txn, we cannot identify if all transactions for requested SCN "
              + "have been located. Requested SinceSCN is :" + scn));
          }
        }
      }
View Full Code Here

  {
    int serversNum = _servers.size();
    if (0 == serversNum)
    {
      enqueueMessage(LifecycleMessage.createSuspendOnErroMessage(
          new DatabusException("No relays specified")));
      return;
    }

    Random rng = new Random();
    DatabusRelayConnection relayConn = null;
View Full Code Here

          }
          else
          {
            String message = "bootstrap checkpoint found but bootstrapping is disabled:" + cp;
            _log.error(message);
            _status.suspendOnError(new DatabusException(message));
            enqueueMessage = false;
          }
        }
        else
        {
View Full Code Here

   */
  protected long sleepToMaintainRate(long duration) throws InterruptedException, DatabusException
  {
    if (duration <= 0 )
    {
      throw new DatabusException("Negative duration specified");
    }

    long remainingTimeNSec = duration;
    long remainingTimeMSec = remainingTimeNSec / DbusConstants.NUM_NSECS_IN_MSEC;
    remainingTimeNSec -= (remainingTimeMSec * DbusConstants.NUM_NSECS_IN_MSEC);
 
View Full Code Here

    long throttleDurationInNs = _ra.getDuration();
    if (throttleDurationInNs < (_maxthrottleDurationInSecs*DbusConstants.NUM_NSECS_IN_SEC))
    {
      if (_expired != false)
      {
        throw new DatabusException("Throttle duration has not expired. _expired must be set to false");
      }
    }
    else
    {
      LOG.info("Ending throttling of events as " + _maxthrottleDurationInSecs + " have expired");
View Full Code Here

    if(_messageState != MessageState.REQUEST_WAIT) {
      String msg = "replacing responseProcessor while in state=" + _messageState;
      _log.error(msg);
      _messageState = MessageState.CLOSED;
      // do we need to find the channel and close it?
      throw new DatabusException(new IllegalStateException(msg));
    } else {
      _log.debug("setting processor " + responseProcessor);
      _responseProcessor = responseProcessor;
    }
  }
View Full Code Here

  protected void setClosed() throws DatabusException
  {
    acquireWriteLock();
    try {
      if(_isClosed) {
        throw new DatabusException("closing already closed buffer");
      }
      _isClosed = true;
    } finally {
      releaseWriteLock();
    }
View Full Code Here

          catch (Exception e)
          {
            LOG.error("Could not read initial SCN value. Value missing or not in expected format; scnLine = "
                             + scnLine,
                         e);
            throw new DatabusException("Failed to load initial SCN value. Value misisng or not in expected format.",
                                       e);
          }
        }
        else
        {
View Full Code Here

        writeScnToFile();
      }
      catch (IOException e)
      {
        LOG.error("Caught exception saving SCN = " + _scn, e);
        throw new DatabusException("Caught exception saving SCN = " + _scn, e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.DatabusException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.