Package org.apache.catalina.cluster.session

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


    }


    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

    }


    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



    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

    }

    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

            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

            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

    }


    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

            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

            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

TOP

Related Classes of org.apache.catalina.cluster.session.ReplicationStream

Copyright © 2018 www.massapicom. 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.