Package org.apache.catalina.tribes.io

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


     * @throws IOException
     */
    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


         * @param offset int
         * @param length int
         * @throws IOException
         */
        public void applyDiff(byte[] diff, int offset, int length) throws IOException, ClassNotFoundException {
            ReplicationStream stream = ((ClusterManager)getManager()).getReplicationStream(diff,offset,length);
            getDeltaRequest().readExternal(stream);
            ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
            try {
                ClassLoader[] loaders = getClassLoaders();
                if ( loaders != null && loaders.length >0 ) Thread.currentThread().setContextClassLoader(loaders[0]);
View Full Code Here

        return getReplicationStream(data,0,data.length);
    }

    public ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException {
        ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
        return new ReplicationStream(fis, getClassLoaders());
    }   
View Full Code Here

        return getReplicationStream(data,0,data.length);
    }

    public ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException {
        ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
        return new ReplicationStream(fis, getClassLoaders());
    }   
View Full Code Here

        return getReplicationStream(data,0,data.length);
    }

    public ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException {
        ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
        return new ReplicationStream(fis, getClassLoaders());
    }   
View Full Code Here

    /**
     * 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

     * @throws IOException
     */
    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

         * @throws IOException
         */
        public void applyDiff(byte[] diff, int offset, int length) throws IOException, ClassNotFoundException {
            try {
                lock();
                ReplicationStream stream = ( (ClusterManager) getManager()).getReplicationStream(diff, offset, length);
                ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
                try {
                    ClassLoader[] loaders = getClassLoaders();
                    if (loaders != null && loaders.length > 0)
                        Thread.currentThread().setContextClassLoader(loaders[0]);
View Full Code Here

         */
        @Override
        public void applyDiff(byte[] diff, int offset, int length) throws IOException, ClassNotFoundException {
            try {
                lock();
                ReplicationStream stream = ( (ClusterManager) getManager()).getReplicationStream(diff, offset, length);
                ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
                try {
                    ClassLoader[] loaders = getClassLoaders();
                    if (loaders != null && loaders.length > 0)
                        Thread.currentThread().setContextClassLoader(loaders[0]);
View Full Code Here

    }

    @Override
    public ReplicationStream getReplicationStream(byte[] data, int offset, int length) throws IOException {
        ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
        return new ReplicationStream(fis, getClassLoaders());
    }   
View Full Code Here

TOP

Related Classes of org.apache.catalina.tribes.io.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.