Package org.jboss.system.server.profileservice.repository.clustered.sync

Examples of org.jboss.system.server.profileservice.repository.clustered.sync.ByteChunk


      synchronized (is)
      {
         b = new byte[MAX_CHUNK_BUFFER_SIZE];
         read = is.read(b);
      }
      ByteChunk byteChunk = new ByteChunk(b, read);
     
      // Write the bytes to our temp file as well
      if (byteChunk.getByteCount() > -1)
      {
         writeBytes(byteChunk);
      }
     
      return byteChunk;
View Full Code Here


            rethrowAsException(t);
         }
        
         if (rsp instanceof ByteChunk)
         {
            ByteChunk chunk = (ByteChunk) rsp;
            lastRead = chunk.getByteCount();
            if (lastRead > -1)
            {
               action.writeBytes(chunk);
            }
         }  
View Full Code Here

      int lastRead = 0;
      while (lastRead > -1)
      {
         try
         {
            ByteChunk chunk = action.getNextBytes();
        
            Object[] args = new Object[]{ id, action.getRepositoryContentModification().getItem(), chunk};
            // JBAS-7102 -- send chunks async; if there is a problem applying we'll
            // fail in the prepare phase
            this.partition.callAsynchMethodOnCluster(getServiceHAName(), "pushBytes", args, PUSH_BYTES_TYPES, true);
            lastRead = chunk.getByteCount();
         }
         catch (Exception e)
         {
            action.cancel();
            throw e;
View Full Code Here

      synchronized (is)
      {
         b = new byte[MAX_CHUNK_BUFFER_SIZE];
         read = is.read(b);
      }
      ByteChunk byteChunk = new ByteChunk(b, read);
     
      // Write the bytes to our temp file as well
      if (byteChunk.getByteCount() > -1)
      {
         writeBytes(byteChunk);
      }
     
      return byteChunk;
View Full Code Here

      synchronized (is)
      {
         b = new byte[MAX_CHUNK_BUFFER_SIZE];
         read = is.read(b);
      }
      return new ByteChunk(b, read);
   }
View Full Code Here

            rethrowAsException(t);
         }
        
         if (rsp instanceof ByteChunk)
         {
            ByteChunk chunk = (ByteChunk) rsp;
            lastRead = chunk.getByteCount();
            if (lastRead > -1)
            {
               action.writeBytes(chunk);
            }
         }  
View Full Code Here

      int lastRead = 0;
      while (lastRead > -1)
      {
         try
         {
            ByteChunk chunk = action.getNextBytes();
        
            Object[] args = new Object[]{ id, action.getRepositoryContentModification().getItem(), chunk};
            List<?> rsps = this.partition.callMethodOnCluster(getServiceHAName(), "pushBytes", args, PUSH_BYTES_TYPES, true);
            for (Object rsp : rsps)
            {
               if (rsp instanceof NotSynchronizedException)
               {
                  continue;
               }
               else if (rsp instanceof Throwable)
               {
                  rethrowAsException((Throwable) rsp);
               }
            }
            lastRead = chunk.getByteCount();
         }
         catch (Exception e)
         {
            action.cancel();
            throw e;
View Full Code Here

TOP

Related Classes of org.jboss.system.server.profileservice.repository.clustered.sync.ByteChunk

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.