Package com.sun.sgs.impl.sharedutil

Examples of com.sun.sgs.impl.sharedutil.PropertiesWrapper


                                   ComponentRegistry systemRegistry,
                                   TransactionProxy txnProxy) {
        logger.log(Level.CONFIG, "Creating FixedTimeContinuePolicy");
        this.txnProxy = txnProxy;
       
        PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);
        this.continueThreshold = wrappedProps.getLongProperty(
                CONTINUE_THRESHOLD_PROPERTY, CONTINUE_THRESHOLD_DEFAULT);
        if (continueThreshold <= 0) {
            throw new IllegalStateException("Continue threshold property " +
                                            "must be positive");
        }
View Full Code Here


             ComponentRegistry systemRegistry,
             TransactionProxy txnProxy)
  throws IOException
    {
        logger.log(Level.CONFIG, "Creating DataStoreServerImpl");
  PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);
  store = new CustomDataStoreImpl(properties, systemRegistry, txnProxy);
  maxTxnTimeout = wrappedProps.getLongProperty(
      MAX_TXN_TIMEOUT_PROPERTY, DEFAULT_MAX_TXN_TIMEOUT,
      1, Long.MAX_VALUE);
  int requestedPort = wrappedProps.getIntProperty(
      PORT_PROPERTY, DEFAULT_PORT, 0, 65535);
  exporter = noRmi ?
      new SocketExporter(DataStoreServer.class) :
      new Exporter<DataStoreServer>(DataStoreServer.class);
  port = exporter.export(this, "DataStoreServer", requestedPort);
  if (requestedPort == 0) {
      logger.log(Level.INFO, "Server is using port {0,number,#}", port);
  }
  long reapDelay = wrappedProps.getLongProperty(
      REAP_DELAY_PROPERTY, DEFAULT_REAP_DELAY);
  executor = Executors.newSingleThreadScheduledExecutor(
                new NamedThreadFactory("DataStoreServer-TransactionReaper"));
  executor.scheduleAtFixedRate(
      new Runnable() {
View Full Code Here

        defaultProfileLevel = level;
       
        registeredMBeans = new ConcurrentHashMap<String, Object>();

        PropertiesWrapper wrappedProps = new PropertiesWrapper(appProperties);
        boolean createServer =
           wrappedProps.getBooleanProperty(CREATE_MBEAN_SERVER_PROPERTY, false);
        if (createServer) {
            mbeanServer = MBeanServerFactory.createMBeanServer();
        } else {
            mbeanServer = ManagementFactory.getPlatformMBeanServer();
        }
View Full Code Here

     */
    public AggregateTaskListener(Properties properties, Identity owner,
                                 ComponentRegistry registry)
        throws IOException
    {
        PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);

        map = new HashMap<String, TaskDetail>();

        int port = wrappedProps.getIntProperty(PORT_PROPERTY, DEFAULT_PORT);
        networkReporter = new NetworkReporter(port);

        long reportPeriod =
            wrappedProps.getLongProperty(PERIOD_PROPERTY, DEFAULT_PERIOD);
        handle = registry.getComponent(TaskScheduler.class).
            scheduleRecurringTask(new TaskRunnable(), owner,
                                  System.currentTimeMillis() + reportPeriod,
                                  reportPeriod);
        handle.start();
View Full Code Here

     */
    public OperationLoggingProfileOpListener(Properties properties,
                                             Identity owner,
                                             ComponentRegistry registry)
    {
        logOps = (new PropertiesWrapper(properties)).
            getIntProperty(LOG_OPS_PROPERTY, DEFAULT_LOG_OPS);
  localCounters = new HashMap<String, Long>();
    }
View Full Code Here

    {
    taskCount = 0;
  lifetimeHistogram = new PowerOfTwoHistogram();
  windowHistogram = new PowerOfTwoHistogram();

  windowSize = new PropertiesWrapper(properties).
      getIntProperty(ProfileListener.WINDOW_SIZE_PROPERTY,
                           DEFAULT_WINDOW_SIZE);
    }
View Full Code Here

     */
    public SnapshotTaskListener(Properties properties, Identity owner,
                                ComponentRegistry registry)
        throws IOException
    {
        PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);

        map = new HashMap<String, TaskDetail>();

        int port = wrappedProps.getIntProperty(PORT_PROPERTY, DEFAULT_PORT);
        networkReporter = new NetworkReporter(port);

        long reportPeriod =
            wrappedProps.getLongProperty(PERIOD_PROPERTY, DEFAULT_PERIOD);
        handle = registry.getComponent(TaskScheduler.class).
            scheduleRecurringTask(new TaskRunnable(), owner,
                                  System.currentTimeMillis() + reportPeriod,
                                  reportPeriod);
        handle.start();
View Full Code Here

                                    ComponentRegistry registry)
        throws IOException
    {
  localCounters = new ConcurrentHashMap<String, Long>();

        PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);

        int port = wrappedProps.getIntProperty(PORT_PROPERTY, DEFAULT_PORT);
        networkReporter = new NetworkReporter(port);

        long reportPeriod =
            wrappedProps.getLongProperty(PERIOD_PROPERTY, DEFAULT_PERIOD);
        handle = registry.getComponent(TaskScheduler.class).
            scheduleRecurringTask(new AggregatingRunnable(), owner,
                                  System.currentTimeMillis() + reportPeriod,
                                  reportPeriod);
        handle.start();
View Full Code Here

                                  ComponentRegistry registry)
    {

  lastWindowStart = System.currentTimeMillis();

  PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);
  windowSize = wrappedProps.getIntProperty(
      ProfileListener.WINDOW_SIZE_PROPERTY, DEFAULT_WINDOW_SIZE);
  average = wrappedProps.getIntProperty(
      AVERAGE_PROPERTY, DEFAULT_AVERAGE);

  maRunTime = new MovingAverage(average);
  maFailed = new MovingAverage(average);
  maReadyCount = new MovingAverage(average);
View Full Code Here

        if (collectorHandle == null) {
      throw new NullPointerException("Collector handle must not be null");
  }
        this.collectorHandle = collectorHandle;

  PropertiesWrapper props = new PropertiesWrapper(properties);
  this.boundedTimeout =
      props.getLongProperty(TransactionCoordinator.TXN_TIMEOUT_PROPERTY,
          BOUNDED_TIMEOUT_DEFAULT, 1, Long.MAX_VALUE);
  this.unboundedTimeout =
      props.getLongProperty(TransactionCoordinator.
          TXN_UNBOUNDED_TIMEOUT_PROPERTY,
          UNBOUNDED_TIMEOUT_DEFAULT, 1,
          Long.MAX_VALUE);
        this.disablePrepareAndCommitOpt =
            props.getBooleanProperty(
                TransactionCoordinator.
                    TXN_DISABLE_PREPAREANDCOMMIT_OPT_PROPERTY,
                false);
       
        // Set our portion of the ConfigManager MXBean
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.sharedutil.PropertiesWrapper

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.