Package com.caucho.server.cluster

Examples of com.caucho.server.cluster.Server


    this(path, serverId, Thread.currentThread().getContextClassLoader(), false);
  }

  public static FileQueueStore create()
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new IllegalStateException(L.l("FileQueueStore requires an active Resin instance"));

    ClassLoader loader = server.getClassLoader();

    synchronized (_localStore) {
      FileQueueStore store = _localStore.getLevel(loader);

      if (store == null) {
        Path path = RootDirectorySystem.getCurrentDataDirectory();
        String serverId = server.getServerId();

        store = new FileQueueStore(path, serverId, loader, true);

        _localStore.set(store, loader);
      }
View Full Code Here


  private String _url;

  public ManagerClient()
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new IllegalStateException(L.l("ManagerClient was not called in a Resin context. For external clients, use the ManagerClient constructor with host,port arguments."));

    _bamClient = server.createAdminClient(getClass().getSimpleName());

    _managerAddress = "manager@resin.caucho";
  }
View Full Code Here

    _managerAddress = "manager@resin.caucho";
  }

  public ManagerClient(String serverId)
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new IllegalStateException(L.l("ManagerClient was not called in a Resin context. For external clients, use the ManagerClient constructor with host,port arguments."));

    _bamClient = server.createAdminClient(getClass().getSimpleName());

    _managerAddress = "manager@" + serverId + ".resin.caucho";
  }
View Full Code Here

    this(path, serverId, Thread.currentThread().getContextClassLoader(), false);
  }

  public static FileQueueStore create()
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new IllegalStateException(L.l("FileQueueStore requires an active Resin instance"));

    ClassLoader loader = server.getClassLoader();

    synchronized (_localStore) {
      FileQueueStore store = _localStore.getLevel(loader);

      if (store == null) {
  Path path = server.getResinDataDirectory();
  String serverId = server.getServerId();

  store = new FileQueueStore(path, serverId, loader, true);

  _localStore.set(store, loader);
      }
View Full Code Here

  }

  private void initServer()
    throws ConfigException
  {
    Server server = Server.getCurrent();
   
    if (server == null)
      throw new ConfigException(L.l("'{0}' cannot be initialized because it is not in a Resin environment",
                                    getClass().getSimpleName()));

    _manager = server.getDistributedVoteManager();

    if (_manager == null)
      throw new IllegalStateException(L.l("distributed vote manager not available"));
  }
View Full Code Here

  }

  private void initServer()
    throws ConfigException
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new ConfigException(L.l("'{0}' cannot be initialized because it is not in a Resin environment",
                                    getClass().getSimpleName()));

    _manager = server.getDistributedLockManager();

    if (_manager == null)
      throw new IllegalStateException("distributed lock manager not available");
  }
View Full Code Here

  }

  private void initServer()
    throws ConfigException
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new ConfigException(L.l("'{0}' cannot be initialized because it is not in a clustered environment",
                                    getClass().getSimpleName()));

    _manager = server.getDistributedCacheManager();

    if (_manager == null)
      throw new IllegalStateException("distributed cache manager not available");
  }
View Full Code Here

  private CustomLoadBalanceManager _loadBalancer;

  public HttpProxyServlet()
  {
    Server server = Server.getCurrent();

    _loadBalancer = server.createProxyLoadBalancer("Resin|Http Proxy");
  }
View Full Code Here

  private int _idCount = 0;

  public FastCGIServlet()
  {
    Server server = Server.getCurrent();

    _loadBalancer = server.createProxyLoadBalancer("Resin|FastCGI");
  }
View Full Code Here

  public void init()
    throws ServletException
  {
    _pwd = Vfs.lookup();

    Server server = Server.getCurrent();

    if (server == null)
      throw new ConfigException(L.l("Server context is required for '{0}'",
                                    this));
View Full Code Here

TOP

Related Classes of com.caucho.server.cluster.Server

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.