Package java.io

Examples of java.io.ObjectOutputStream.writeLong()


                ObjectHashMap memory = (ObjectHashMap) context.wm.getNodeMemory( (NodeMemory) sink );
                InternalFactHandle ifh = (InternalFactHandle) memory.get( leftTuple );
                // first we serialize the generated fact handle ID
                //context.out.println( "FactHandle id:"+ifh.getId() );
                stream.writeInt( ifh.getId() );
                stream.writeLong( ifh.getRecency() );

                writeRightTuples( ifh,
                                  context );

                stream.writeShort( PersisterEnums.END );
View Full Code Here


                                       LeftTuple leftTuple,
                                       AgendaItem agendaItem,
                                       RuleTerminalNode ruleTerminalNode) throws IOException {
        ObjectOutputStream stream = context.stream;

        stream.writeLong( agendaItem.getActivationNumber() );

        stream.writeInt( context.terminalTupleMap.get( leftTuple ) );

        stream.writeInt( agendaItem.getSalience() );
View Full Code Here

        stream.writeUTF( rule.getName() );

        //context.out.println( "Rule " + rule.getPackage() + "." + rule.getName() );

        //context.out.println( "AgendaItem long:" + agendaItem.getPropagationContext().getPropagationNumber() );
        stream.writeLong( agendaItem.getPropagationContext().getPropagationNumber() );

        if ( agendaItem.getActivationGroupNode() != null ) {
            stream.writeBoolean( true );
            //context.out.println( "ActivationGroup bool:" + true );
            stream.writeUTF( agendaItem.getActivationGroupNode().getActivationGroup().getName() );
View Full Code Here

            stream.writeInt( tuples.get( tupleOrigin ) );
        } else {
            stream.writeBoolean( false );
        }

        stream.writeLong( pc.getPropagationNumber() );
        if ( pc.getFactHandleOrigin() != null ) {
            stream.writeInt( ((InternalFactHandle) pc.getFactHandleOrigin()).getId() );
        } else {
            stream.writeInt( -1 );
        }
View Full Code Here

    }

    public static void writeWorkItem(MarshallerWriteContext context,
                                     WorkItem workItem) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( workItem.getId() );
        stream.writeLong( workItem.getProcessInstanceId() );
        stream.writeUTF( workItem.getName() );
        stream.writeInt( workItem.getState() );

        //Work Item Parameters
View Full Code Here

    public static void writeWorkItem(MarshallerWriteContext context,
                                     WorkItem workItem) throws IOException {
        ObjectOutputStream stream = context.stream;
        stream.writeLong( workItem.getId() );
        stream.writeLong( workItem.getProcessInstanceId() );
        stream.writeUTF( workItem.getName() );
        stream.writeInt( workItem.getState() );

        //Work Item Parameters
        Map<String, Object> parameters = workItem.getParameters();
View Full Code Here

        // First, write the type
        out.write( LONG_VALUE );
       
        // Now, flush the Long
        out.writeLong( value );
       
        // And return the result
        out.flush();

        if ( LOG.isDebugEnabled() )
View Full Code Here

        baos = new ByteArrayOutputStream();
        oos = new ObjectOutputStream( baos );       
       
        oos.writeBoolean( bpage._isLeaf );
        if ( bpage._isLeaf ) {
            oos.writeLong( bpage._previous );
            oos.writeLong( bpage._next );
        }

        oos.writeInt( bpage._first );
       
View Full Code Here

        oos = new ObjectOutputStream( baos );       
       
        oos.writeBoolean( bpage._isLeaf );
        if ( bpage._isLeaf ) {
            oos.writeLong( bpage._previous );
            oos.writeLong( bpage._next );
        }

        oos.writeInt( bpage._first );
       
        for ( int i=bpage._first; i<_btree._pageSize; i++ ) {
View Full Code Here

                    }
                }
            }
        } else {
            for ( int i=bpage._first; i<_btree._pageSize; i++ ) {
                oos.writeLong( bpage._children[ i ] );
            }
        }
       
        oos.flush();
        data = baos.toByteArray();
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.