Examples of PropertiesWrapper


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

     */
    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

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

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

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

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

     */
    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

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

   
    /** Creates a new instance of RoundRobinPolicy */
    public RoundRobinPolicy(Properties props, NodeMappingServerImpl server) {
        this.server = server;
       
        PropertiesWrapper wrappedProps = new PropertiesWrapper(props);
        moveCount = wrappedProps.getIntProperty(
                MOVE_COUNT_PROPERTY, DEFAULT_MOVE_COUNT);
    }
View Full Code Here

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

                                    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

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

  throws Exception
    {
  super(properties, systemRegistry, txnProxy, logger);
  logger.log(Level.CONFIG, "Creating WatchdogServiceImpl properties:{0}",
       properties);
  PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);

  // Setup the KernelShutdownController object
        if (ctrl == null) {
            throw new NullPointerException("null shutdown controller");
        }
  shutdownController = ctrl;
 
  try {
      localHost = InetAddress.getLocalHost().getHostName();
               
            NodeType nodeType =
                wrappedProps.getEnumProperty(StandardProperties.NODE_TYPE,
                                             NodeType.class,
                                             NodeType.singleNode);
            boolean startServer = nodeType != NodeType.appNode;
            boolean isFullStack = nodeType != NodeType.coreServerNode;
           
      int clientPort = wrappedProps.getIntProperty(
    CLIENT_PORT_PROPERTY, DEFAULT_CLIENT_PORT, 0, 65535);
           
      String clientHost = wrappedProps.getProperty(
    CLIENT_HOST_PROPERTY, localHost);

      /*
       * Check service version.
       */
      transactionScheduler.runTask(
    new AbstractKernelRunnable("CheckServiceVersion") {
        public void run() {
      checkServiceVersion(
          VERSION_KEY, MAJOR_VERSION, MINOR_VERSION);
        } },  taskOwner);

      clientImpl = new WatchdogClientImpl();
      exporter = new Exporter<WatchdogClient>(WatchdogClient.class);
      exporter.export(clientImpl, clientPort);
      clientProxy = exporter.getProxy();
           
      String host;
      int serverPort;
      if (startServer) {
    serverImpl = new WatchdogServerImpl(
        properties, systemRegistry, txnProxy,
        clientHost, clientProxy, isFullStack);
    host = localHost;
    serverPort = serverImpl.getPort();
      } else {
    host = wrappedProps.getProperty(
        HOST_PROPERTY,
        wrappedProps.getProperty(
      StandardProperties.SERVER_HOST));
                if (host == null) {
                    throw new IllegalArgumentException(
                                           "A server host must be specified");
                }
    serverPort = wrappedProps.getIntProperty(
        SERVER_PORT_PROPERTY, DEFAULT_SERVER_PORT, 1, 65535);
      }

      Registry rmiRegistry = LocateRegistry.getRegistry(host, serverPort);
      serverProxy = (WatchdogServer)
    rmiRegistry.lookup(WatchdogServerImpl.WATCHDOG_SERVER_NAME);

            int jmxPort = wrappedProps.getIntProperty(
                    StandardProperties.SYSTEM_JMX_REMOTE_PORT, -1);
            if (startServer) {
                localNodeId = serverImpl.localNodeId;
                renewInterval = serverImpl.renewInterval;
            } else {
View Full Code Here

Examples of org.apache.maven.surefire.booter.PropertiesWrapper

                                                 StartupConfiguration testProviderConfiguration,
                                                 boolean readTestsFromInStream )
        throws IOException
    {
        final ForkConfiguration forkConfiguration = ForkConfigurationTest.getForkConfiguration( null, null );
        PropertiesWrapper props = new PropertiesWrapper( new Properties() );
        BooterSerializer booterSerializer = new BooterSerializer( forkConfiguration );
        Object test;
        if ( readTestsFromInStream )
        {
            test = null;
View Full Code Here

Examples of org.apache.maven.surefire.booter.PropertiesWrapper

    private StartupConfiguration saveAndReload( StartupConfiguration startupConfiguration )
        throws IOException
    {
        final ForkConfiguration forkConfiguration = ForkConfigurationTest.getForkConfiguration( null, null );
        PropertiesWrapper props = new PropertiesWrapper( new Properties() );
        BooterSerializer booterSerializer = new BooterSerializer( forkConfiguration );
        String aTest = "aTest";
        final File propsTest =
            booterSerializer.serialize( props, getProviderConfiguration(), startupConfiguration, aTest, false );
        BooterDeserializer booterDeserializer = new BooterDeserializer( new FileInputStream( propsTest ) );
View Full Code Here

Examples of org.apache.maven.surefire.booter.PropertiesWrapper

            scanResult.writeTo( providerProperties );
            if ( isForkOnce() )
            {
                final ForkClient forkClient =
                    new ForkClient( defaultReporterFactory, startupReportConfiguration.getTestVmSystemProperties() );
                result = fork( null, new PropertiesWrapper( providerProperties ), forkClient, effectiveSystemProperties,
                               null );
            }
            else
            {
                if ( forkConfiguration.isReuseForks() )
View Full Code Here

Examples of org.apache.maven.surefire.booter.PropertiesWrapper

                        ForkClient forkClient = new ForkClient( defaultReporterFactory,
                                                                startupReportConfiguration.getTestVmSystemProperties(),
                                                                testProvidingInputStream );

                        return fork( null, new PropertiesWrapper( providerConfiguration.getProviderProperties() ),
                                     forkClient, effectiveSystemProperties, testProvidingInputStream );
                    }
                };

                results.add( executorService.submit( pf ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.