Package java.io

Examples of java.io.ObjectOutputStream.writeLong()


                                            RuleFlowProcessInstance processInstance) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( processInstance.getId() );
        stream.writeUTF( processInstance.getProcessId() );
        stream.writeInt( processInstance.getState() );
        stream.writeLong( processInstance.getNodeInstanceCounter() );

        VariableScopeInstance variableScopeInstance = (VariableScopeInstance) processInstance.getContextInstance( VariableScope.VARIABLE_SCOPE );
        Map<String, Object> variables = variableScopeInstance.getVariables();
        List<String> keys = new ArrayList<String>( variables.keySet() );
        Collections.sort( keys,
View Full Code Here


        try {
            oos = serialProvider
                .createObjectOutputStream(new BufferedOutputStream(base));
           
            if (stateTimeoutEnabled) {
                oos.writeLong(System.currentTimeMillis());

            }

            Object[] stateToWrite = (Object[]) state;
View Full Code Here

    }

    public static void writeNodeInstance(MarshallerWriteContext context,
                                         NodeInstance nodeInstance) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( nodeInstance.getId() );
        stream.writeLong( nodeInstance.getNodeId() );
        if ( nodeInstance instanceof RuleSetNodeInstance ) {
            stream.writeShort( PersisterEnums.RULE_SET_NODE_INSTANCE );
        } else if ( nodeInstance instanceof HumanTaskNodeInstance ) {
            stream.writeShort( PersisterEnums.HUMAN_TASK_NODE_INSTANCE );
View Full Code Here

    public static void writeNodeInstance(MarshallerWriteContext context,
                                         NodeInstance nodeInstance) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( nodeInstance.getId() );
        stream.writeLong( nodeInstance.getNodeId() );
        if ( nodeInstance instanceof RuleSetNodeInstance ) {
            stream.writeShort( PersisterEnums.RULE_SET_NODE_INSTANCE );
        } else if ( nodeInstance instanceof HumanTaskNodeInstance ) {
            stream.writeShort( PersisterEnums.HUMAN_TASK_NODE_INSTANCE );
            stream.writeLong( ((HumanTaskNodeInstance) nodeInstance).getWorkItem().getId() );
View Full Code Here

        stream.writeLong( nodeInstance.getNodeId() );
        if ( nodeInstance instanceof RuleSetNodeInstance ) {
            stream.writeShort( PersisterEnums.RULE_SET_NODE_INSTANCE );
        } else if ( nodeInstance instanceof HumanTaskNodeInstance ) {
            stream.writeShort( PersisterEnums.HUMAN_TASK_NODE_INSTANCE );
            stream.writeLong( ((HumanTaskNodeInstance) nodeInstance).getWorkItem().getId() );
        } else if ( nodeInstance instanceof WorkItemNodeInstance ) {
            stream.writeShort( PersisterEnums.WORK_ITEM_NODE_INSTANCE );
            stream.writeLong( ((WorkItemNodeInstance) nodeInstance).getWorkItem().getId() );
        } else if ( nodeInstance instanceof SubProcessNodeInstance ) {
            stream.writeShort( PersisterEnums.SUB_PROCESS_NODE_INSTANCE );
View Full Code Here

        } else if ( nodeInstance instanceof HumanTaskNodeInstance ) {
            stream.writeShort( PersisterEnums.HUMAN_TASK_NODE_INSTANCE );
            stream.writeLong( ((HumanTaskNodeInstance) nodeInstance).getWorkItem().getId() );
        } else if ( nodeInstance instanceof WorkItemNodeInstance ) {
            stream.writeShort( PersisterEnums.WORK_ITEM_NODE_INSTANCE );
            stream.writeLong( ((WorkItemNodeInstance) nodeInstance).getWorkItem().getId() );
        } else if ( nodeInstance instanceof SubProcessNodeInstance ) {
            stream.writeShort( PersisterEnums.SUB_PROCESS_NODE_INSTANCE );
            stream.writeLong( ((SubProcessNodeInstance) nodeInstance).getProcessInstanceId() );
        } else if ( nodeInstance instanceof MilestoneNodeInstance ) {
            stream.writeShort( PersisterEnums.MILESTONE_NODE_INSTANCE );
View Full Code Here

        } else if ( nodeInstance instanceof WorkItemNodeInstance ) {
            stream.writeShort( PersisterEnums.WORK_ITEM_NODE_INSTANCE );
            stream.writeLong( ((WorkItemNodeInstance) nodeInstance).getWorkItem().getId() );
        } else if ( nodeInstance instanceof SubProcessNodeInstance ) {
            stream.writeShort( PersisterEnums.SUB_PROCESS_NODE_INSTANCE );
            stream.writeLong( ((SubProcessNodeInstance) nodeInstance).getProcessInstanceId() );
        } else if ( nodeInstance instanceof MilestoneNodeInstance ) {
            stream.writeShort( PersisterEnums.MILESTONE_NODE_INSTANCE );
            List<Long> timerInstances =
              ((MilestoneNodeInstance) nodeInstance).getTimerInstances();
            if (timerInstances != null) {
View Full Code Here

            List<Long> timerInstances =
              ((MilestoneNodeInstance) nodeInstance).getTimerInstances();
            if (timerInstances != null) {
              stream.writeInt(timerInstances.size());
              for (Long id: timerInstances) {
                stream.writeLong(id);
              }
            } else {
              stream.writeInt(0);
            }
        } else if ( nodeInstance instanceof TimerNodeInstance ) {
View Full Code Here

            } else {
              stream.writeInt(0);
            }
        } else if ( nodeInstance instanceof TimerNodeInstance ) {
            stream.writeShort( PersisterEnums.TIMER_NODE_INSTANCE );
            stream.writeLong( ((TimerNodeInstance) nodeInstance).getTimerId() );
        } else if ( nodeInstance instanceof JoinInstance ) {
            stream.writeShort( PersisterEnums.JOIN_NODE_INSTANCE );
            Map<Long, Integer> triggers = ((JoinInstance) nodeInstance).getTriggers();
            stream.writeInt( triggers.size() );
            List<Long> keys = new ArrayList<Long>( triggers.keySet() );
View Full Code Here

                                                     Long o2) {
                                      return o1.compareTo( o2 );
                                  }
                              } );
            for ( Long key : keys ) {
                stream.writeLong( key );
                stream.writeInt( triggers.get( key ) );
            }
        } else if ( nodeInstance instanceof CompositeContextNodeInstance ) {
            stream.writeShort( PersisterEnums.COMPOSITE_NODE_INSTANCE );
            CompositeContextNodeInstance compositeNodeInstance = (CompositeContextNodeInstance) nodeInstance;
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.