Examples of Serviceable


Examples of org.apache.derby.iapi.services.daemon.Serviceable

  protected void serviceClient(ServiceRecord clientRecord)
  {
    clientRecord.serviced();

    Serviceable client = clientRecord.client;

    // client may have unsubscribed while it had items queued
    if (client == null)
      return;

    ContextManager cm = contextMgr;

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(cm != null, "Context manager is null");
      SanityManager.ASSERT(client != null, "client is null");
    }

    try
    {
      int status = client.performWork(cm);

      if (clientRecord.subscriber)
        return;

      if (status == Serviceable.REQUEUE)
      {
        List queue = client.serviceASAP() ? highPQ : normPQ;
        synchronized (this) {
          queue.add(clientRecord);

          if (SanityManager.DEBUG) {
View Full Code Here

Examples of org.apache.derby.iapi.services.daemon.Serviceable

          containerHdl.preDirty(false);
        }


        // remember this as a post commit work item
        Serviceable p =
                    new ReclaimSpace(
                            ReclaimSpace.CONTAINER,
                            ckey,
                            this,
                            true /* service ASAP */);
 
View Full Code Here

Examples of org.apache.derby.iapi.services.daemon.Serviceable

          containerHdl.preDirty(false);
        }


        // remember this as a post commit work item
        Serviceable p = new ReclaimSpace(ReclaimSpace.CONTAINER, ckey,
                         this, true /* service ASAP */);

        if (SanityManager.DEBUG)
                {
                    if (SanityManager.DEBUG_ON(DaemonService.DaemonTrace))
View Full Code Here

Examples of org.apache.derby.iapi.services.daemon.Serviceable

  protected void serviceClient(ServiceRecord clientRecord)
  {
    clientRecord.serviced();

    Serviceable client = clientRecord.client;

    // client may have unsubscribed while it had items queued
    if (client == null)
      return;

    ContextManager cm = contextMgr;

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(cm != null, "Context manager is null");
      SanityManager.ASSERT(client != null, "client is null");
    }

    try
    {
      int status = client.performWork(cm);

      if (clientRecord.subscriber)
        return;

      if (status == Serviceable.REQUEUE)
      {
        List queue = client.serviceASAP() ? highPQ : normPQ;
        synchronized (this) {
          queue.add(clientRecord);

          if (SanityManager.DEBUG) {
View Full Code Here

Examples of org.apache.derby.iapi.services.daemon.Serviceable

          containerHdl.preDirty(false);
        }


        // remember this as a post commit work item
        Serviceable p =
                    new ReclaimSpace(
                            ReclaimSpace.CONTAINER,
                            ckey,
                            this,
                            true /* service ASAP */);
 
View Full Code Here

Examples of org.mokai.Serviceable

   */
  public static void start(Object object) throws ExecutionException {
    try {
      // start the object if it implements Serviceable
      if (Serviceable.class.isInstance(object)) {
        Serviceable connectorService = (Serviceable) object;
        connectorService.doStart();
      }
    } catch (Exception e) {
      throw new ExecutionException("Exception while starting object: " + e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.mokai.Serviceable

   */
  public static void stop(Object object) throws ExecutionException {
    try {
      // stop the object if it implements Serviceable
      if (Serviceable.class.isInstance(object)) {
        Serviceable connectorService = (Serviceable) object;
        connectorService.doStop();
      }
    } catch (Exception e) {
      throw new ExecutionException("Exception while stopping object: " + e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.mokai.Serviceable

  @Override
  public void doStart() throws Exception {
    for (Processor processor : processors) {
      if (Serviceable.class.isInstance(processor)) {
        Serviceable serviceable = (Serviceable) processor;
        serviceable.doStart();
      }
    }
  }
View Full Code Here

Examples of org.mokai.Serviceable

  @Override
  public void doStop() throws Exception {
    for (Processor processor : processors) {
      if (Serviceable.class.isInstance(processor)) {
        Serviceable serviceable = (Serviceable) processor;
        serviceable.doStop();
      }
    }
  }
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.