Examples of ReplicationStream


Examples of org.apache.catalina.cluster.session.ReplicationStream

    }


    public void messageDataReceived(byte[] data) {
        try {
            ReplicationStream stream =
                new ReplicationStream(new java.io.ByteArrayInputStream(data),
                                      getClass().getClassLoader());
            Object myobj = stream.readObject();
            if ( myobj != null && myobj instanceof SessionMessage ) {
               
                SessionMessage msg = (SessionMessage)myobj;
                log.debug("Assuming clocks are synched: Replication took="+(System.currentTimeMillis()-msg.getTimestamp())+" ms.");
                String ctxname = msg.getContextName();
View Full Code Here

Examples of org.apache.catalina.cluster.session.ReplicationStream

    }


    public void messageDataReceived(byte[] data) {
        try {
            ReplicationStream stream =
                new ReplicationStream(new java.io.ByteArrayInputStream(data),
                                      getClass().getClassLoader());
            Object myobj = stream.readObject();
            if ( myobj != null && myobj instanceof SessionMessage ) {
               
                SessionMessage msg = (SessionMessage)myobj;
                log.debug("Assuming clocks are synched: Replication took="+(System.currentTimeMillis()-msg.getTimestamp())+" ms.");
                String ctxname = msg.getContextName();
View Full Code Here

Examples of org.apache.catalina.cluster.session.ReplicationStream

    }


    public void messageDataReceived(byte[] data) {
        try {
            ReplicationStream stream =
                new ReplicationStream(new java.io.ByteArrayInputStream(data),
                                      getClass().getClassLoader());
            Object myobj = stream.readObject();
            if ( myobj != null && myobj instanceof SessionMessage ) {
               
                SessionMessage msg = (SessionMessage)myobj;
                String ctxname = msg.getContextName();
                //check if the message is a EVT_GET_ALL_SESSIONS,
View Full Code Here

Examples of org.apache.catalina.cluster.session.ReplicationStream



    public void messageDataReceived(byte[] data) {
        try {
            ReplicationStream stream =
                new ReplicationStream(new java.io.ByteArrayInputStream(data),
                                      getClass().getClassLoader());
            Object myobj = stream.readObject();
            if ( myobj != null && myobj instanceof SessionMessage ) {
                SessionMessage msg = (SessionMessage)myobj;
                //remove when checking in
                perfMessageRecvd(msg.getTimestamp());
                String name = msg.getContextName();
View Full Code Here

Examples of org.apache.catalina.cluster.session.ReplicationStream

    }

    public void messageDataReceived(byte[] data) {
        long timeSent = System.currentTimeMillis();
        try {
            ReplicationStream stream = new ReplicationStream(
                    new java.io.ByteArrayInputStream(data), getClass()
                            .getClassLoader());
            Object myobj = stream.readObject();
            if (log.isDebugEnabled()
                    && myobj != null && myobj instanceof ClusterMessage)
                log.debug("Assuming clocks are synched: Replication for "
                        + ((ClusterMessage) myobj).getUniqueId() + " took="
                        + (System.currentTimeMillis() - ((ClusterMessage) myobj).getTimestamp())
View Full Code Here

Examples of org.apache.catalina.cluster.session.ReplicationStream

            System.arraycopy(tmpdata, 0, result, 0, tmpdata.length);
            System.arraycopy(tmp, 0, result, tmpdata.length, length);
            length = gin.read(tmp);
        }
        gin.close();
        ReplicationStream stream = new ReplicationStream(
                new java.io.ByteArrayInputStream(result), getClass()
                        .getClassLoader());
        Object myobj = stream.readObject();
        return myobj;
    }
View Full Code Here

Examples of org.apache.catalina.cluster.session.ReplicationStream

            if (isCompress() || data.getCompress() == ClusterMessage.FLAG_ALLOWED ) {
                instream = new GZIPInputStream(new ByteArrayInputStream(data.getMessage()));
            } else {
                instream = new ByteArrayInputStream(data.getMessage());
            }
            ReplicationStream stream = new ReplicationStream(instream,
                    getClass().getClassLoader());
            message = stream.readObject();
            // calc stats really received bytes
            totalReceivedBytes += data.getMessage().length;
            //totalReceivedBytes += data.length;
            nrOfMsgsReceived++;
            instream.close();
View Full Code Here

Examples of org.apache.catalina.tribes.io.ReplicationStream

    /**
     * Load sessionID
     * @throws IOException if an input/output error occurs
     */
    protected String deserializeSessionId(byte[] data) throws IOException {
        ReplicationStream ois = getReplicationStream(data);
        String sessionId = ois.readUTF();
        ois.close();
        return sessionId;
    }
View Full Code Here

Examples of org.apache.catalina.tribes.io.ReplicationStream

     */
    protected DeltaRequest deserializeDeltaRequest(DeltaSession session, byte[] data)
            throws ClassNotFoundException, IOException {
        try {
            session.lock();
            ReplicationStream ois = getReplicationStream(data);
            session.getDeltaRequest().readExternal(ois);
            ois.close();
            return session.getDeltaRequest();
        }finally {
            session.unlock();
        }
    }
View Full Code Here

Examples of org.apache.catalina.tribes.io.ReplicationStream

    /**
     * Load sessionID
     * @throws IOException if an input/output error occurs
     */
    protected String deserializeSessionId(byte[] data) throws IOException {
        ReplicationStream ois = getReplicationStream(data);
        String sessionId = ois.readUTF();
        ois.close();
        return sessionId;
    }
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.