Package com.linkedin.databus.core.util

Examples of com.linkedin.databus.core.util.InvalidConfigException


    }

    @Override
    public TcpStaticConfig build() throws InvalidConfigException
    {
      if (_enabled && 0 >= _port) throw new InvalidConfigException("invalid TCP port: " + _port);
      TcpStaticConfig newConfig = new TcpStaticConfig(_enabled, _port);
      LOG.info("TCP command interface configuration:" + newConfig);
      return newConfig;
    }
View Full Code Here


      {
        providerType = CheckpointPersistenceStaticConfig.ProviderType.valueOf(_type.toUpperCase());
      }
      catch (Exception e)
      {
        throw new InvalidConfigException("invalid cp3 type:" + _type, e);
      }

      if (CheckpointPersistenceStaticConfig.ProviderType.EXISTING == providerType &&
          null == getExisting())
      {
        throw new InvalidConfigException("no existing checkpoint persistence provider specified");
      }

      LOG.info("checkpoint persistence type: " + _type);
      LOG.info("clear before use: " + _clearBeforeUse);
      LOG.info("client-relay protocol version: " + _protocolVersion);
View Full Code Here

    }

    @Override
    public ExecutorConfig build() throws InvalidConfigException
    {
      if (null == _managedInstance) throw new InvalidConfigException("Missing server container");
      return new ExecutorConfig(_maxThreadsNum, _coreThreadsNum,
                                                 _keepAliveMs, _trackerEnabled,
                                                 _maxQueueSize);
    }
View Full Code Here

        return new RuntimeConfig(_requestProcessingBudgetMs,
                                                  _defaultExecutor.build(),
                                                  _ioExecutor.build());
      }

      throw new InvalidConfigException("Server container instance not set");
    }
View Full Code Here

    @Override
    public RuntimeConfig build() throws InvalidConfigException
    {
      if (null == _managedInstance)
      {
        throw new InvalidConfigException("No associated http client for runtime config");
      }

      List<ServerInfo> relays = parseServerInfosMap(getRelays());
      LOG.info("Relays size=" + relays.size());
      if (null != _relaysList && _relaysList.length() > 0) relays = parseServerInfoList(_relaysList, relays);
View Full Code Here

    protected void verifyConfig() throws InvalidConfigException
    {
      if (_pullerBufferUtilizationPct <= 0 || _pullerBufferUtilizationPct > 100)
      {
        throw new InvalidConfigException("invalid puller buffer utilization percentage:" +
            _pullerBufferUtilizationPct);
      }
    }
View Full Code Here

      for (Entry<String, ClusterRegistrationConfig> e : _clientClusters.entrySet())
      {
        String clusterName = e.getValue().getClusterName();

        if (clientClusterStaticConfigs.containsKey(clusterName))
            throw new InvalidConfigException("Duplicate configuration for client cluster :" + clusterName);

        ClusterRegistrationStaticConfig c = e.getValue().build();

        clientClusterStaticConfigs.put(clusterName, c);
      }
View Full Code Here

    {
      handlerType = MaxSCNReaderWriterStaticConfig.Type.valueOf(_type);
    }
    catch (Exception e)
    {
      throw new InvalidConfigException("invalid max scn reader/writer type:" + _type );
    }

    if (MaxSCNReaderWriterStaticConfig.Type.EXISTING == handlerType && null == _existing)
    {
      throw new InvalidConfigException("No existing max scn reader/writer specified ");
    }

    return new MaxSCNReaderWriterStaticConfig(handlerType, _file.build(), _existing);
  }
View Full Code Here

  throws InvalidConfigException
  {
    long startTimeTs = System.nanoTime();

    if(config == null)
      throw new InvalidConfigException("config cannot be null for addNewBuffer");

    // see if a buffer for this mapping exists
    PhysicalPartition pPartition = pConfig.getPhysicalPartition();

    PhysicalPartitionKey pKey = new PhysicalPartitionKey(pPartition);
View Full Code Here

    {
      File scnDir = new File(_scnDir);

      if (!scnDir.exists())
      {
        if (!scnDir.mkdirs()) throw new InvalidConfigException("Unable to create scn dir:" + _scnDir);
      }

      if (! scnDir.isDirectory()) throw new InvalidConfigException("Not an scn dir:" + _scnDir);

      if (_flushItvl <= 0) throw new InvalidConfigException("Invalid flush interval:" + _flushItvl);

      return new StaticConfig(_key, scnDir, _initVal, _flushItvl);
    }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.core.util.InvalidConfigException

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.