Examples of Split


Examples of org.javasimon.Split

    split.stop();
  }
 
  public void disposeOffHeapOverflow() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.disposeOffHeapOverflow");
    Split split = stopWatch.start();
    int bytes2free = usedMemory.get()-(pageSize*pages);
   
    moveEntriesToDisk(bytes2free);
   
    split.stop();
  }
 
View Full Code Here

Examples of org.javasimon.Split

//    split.stop();
//  }
 
  public void askSupervisorForDisposal() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.disposeOverflow");
    Split split = stopWatch.start();
    supervisor.disposeOverflow(this);
    split.stop();
  }
View Full Code Here

Examples of org.javasimon.Split

//    split.stop();
//  }
 
  protected void moveInHeap(CacheEntry entry) {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.moveinheap");
    Split split = stopWatch.start();
    byte[] source = null;
    source = new byte[entry.size];
    try {
      synchronized (entry) {
        ByteBuffer buf = entry.buffer;
        buf.position(entry.position);
        buf.get(source);
        Object obj = serializer.deserialize(source, entry.clazz);
        entry.object = obj;
        entry.buffer = null;
        CacheEntry freeSlot = new CacheEntry();
        freeSlot.buffer = buf;
        freeSlot.position = entry.position;
        freeSlot.buffer.position(freeSlot.position);
        freeSlot.size = entry.size;
        slots.add(freeSlot);
        logger.debug("added slot of " + freeSlot.size + " bytes");
      }

      lruOffheapQueue.remove(entry);
     
      usedMemory.addAndGet(-source.length);
      lruQueue.remove(entry);
      lruQueue.add(entry);
    } catch (UTFDataFormatException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (StreamCorruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (EOFException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (ClassNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (InstantiationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    split.stop();
  }
View Full Code Here

Examples of org.jberet.job.Split

                    if (flow.getId().equals(restartPoint)) {
                        runFlow(flow, null);
                        break;
                    }
                } else if (e instanceof Split) {
                    Split split = (Split) e;
                    if (split.getId().equals(restartPoint)) {
                        runSplit(split);
                        break;
                    }
                } else if (e instanceof Decision) {
                    Decision decision = (Decision) e;
                    if (decision.getId().equals(restartPoint)) {
                        runDecision(decision);
                    }
                    break;
                }
            }
        } else {
            // the head of the composite job element is the first non-abstract element (step, flow, or split)
            for (Object e : getJobElements()) {
                if (e instanceof Step) {
                    Step step = (Step) e;
//                if (Boolean.parseBoolean(step.getAbstract())) {
//                    continue;
//                }
                    runStep(step);
                    break;
                } else if (e instanceof Flow) {
                    Flow flow = (Flow) e;
                    //A flow cannot be abstract or have parent, so run the flow
                    runFlow(flow, null);
                    break;
                } else if (e instanceof Split) {
                    Split split = (Split) e;
                    //A split cannot be abstract or have parent, so run the split
                    runSplit(split);
                    break;
                } else if (e instanceof Decision) {
                    Decision decision = (Decision) e;
View Full Code Here

Examples of org.jberet.job.model.Split

                    if (flow.getId().equals(restartPoint)) {
                        runFlow(flow, null);
                        break;
                    }
                } else if (e instanceof Split) {
                    final Split split = (Split) e;
                    if (split.getId().equals(restartPoint)) {
                        runSplit(split);
                        break;
                    }
                } else if (e instanceof Decision) {
                    final Decision decision = (Decision) e;
                    if (decision.getId().equals(restartPoint)) {
                        runDecision(decision);
                    }
                    break;
                }
            }
        } else {
            // the head of the composite job element is the first non-abstract element (step, flow, or split)
            for (final JobElement e : getJobElements()) {
                if (e instanceof Step) {
                    final Step step = (Step) e;
//                if (Boolean.parseBoolean(step.getAbstract())) {
//                    continue;
//                }
                    runStep(step);
                    break;
                } else if (e instanceof Flow) {
                    final Flow flow = (Flow) e;
                    //A flow cannot be abstract or have parent, so run the flow
                    runFlow(flow, null);
                    break;
                } else if (e instanceof Split) {
                    final Split split = (Split) e;
                    //A split cannot be abstract or have parent, so run the split
                    runSplit(split);
                    break;
                } else if (e instanceof Decision) {
                    final Decision decision = (Decision) e;
View Full Code Here

Examples of org.jberet.job.model.Split

                if (flow.getId().equals(jobElementName)) {
                    runFlow(flow, null);
                    return;
                }
            } else if (e instanceof Split) {
                final Split split = (Split) e;
                if (split.getId().equals(jobElementName)) {
                    runSplit(split);
                    return;
                }
            }
        }
View Full Code Here

Examples of org.jbpm.workflow.core.node.Split

            }
        };
        process.addNode(new StartNode());
        process.addNode(new EndNode());
        process.addNode(new ActionNode());
        process.addNode(new Split());
        process.addNode(new Join());
        process.addNode(new MilestoneNode());
        process.addNode(new RuleSetNode());
        process.addNode(new SubProcessNode());
        process.addNode(new WorkItemNode());
View Full Code Here

Examples of org.jbpm.workflow.core.node.Split

        faultNode.setMetaData("height", 4);
        faultNode.setFaultName("faultName");
        faultNode.setFaultVariable("faultVariable");
        process.addNode(faultNode);
       
        Split split = new Split();
        split.setName("split");
        split.setMetaData("x", 1);
        split.setMetaData("y", 2);
        split.setMetaData("width", 3);
        split.setMetaData("height", 4);
        split.setType(Split.TYPE_XOR);
        Connection connection = new ConnectionImpl(split, Node.CONNECTION_DEFAULT_TYPE, actionNode, Node.CONNECTION_DEFAULT_TYPE);
        Constraint constraint = new ConstraintImpl();
        constraint.setName("constraint1 ><&&");
        constraint.setPriority(1);
        constraint.setDialect("dialect1");
        constraint.setType("type1");
        constraint.setConstraint("constraint-text1");
        split.setConstraint(connection, constraint);
        connection = new ConnectionImpl(split, Node.CONNECTION_DEFAULT_TYPE, ruleSetNode, Node.CONNECTION_DEFAULT_TYPE);
        constraint = new ConstraintImpl();
        constraint.setName("constraint2");
        constraint.setPriority(2);
        constraint.setDialect("dialect2");
        constraint.setType("type2");
        constraint.setConstraint("constraint-text2");
        split.setConstraint(connection, constraint);
        process.addNode(split);
        new ConnectionImpl(startNode, Node.CONNECTION_DEFAULT_TYPE, split, Node.CONNECTION_DEFAULT_TYPE);
       
        EventNode eventNode = new EventNode();
        eventNode.setName("action");
View Full Code Here

Examples of org.jbpm.workflow.core.node.Split

import org.xml.sax.SAXException;

public class SplitNodeHandler extends AbstractNodeHandler {

    protected Node createNode() {
        return new Split();
    }
View Full Code Here

Examples of org.jbpm.workflow.core.node.Split

    public void handleNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser)
            throws SAXException {
        super.handleNode(node, element, uri, localName, parser);
        Split splitNode = (Split) node;
        String type = element.getAttribute("type");
        if (type != null && type.length() != 0 ) {
            splitNode.setType(new Integer(type));
        }
    }
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.