Package org.exoplatform.services.jcr.impl.util.io

Examples of org.exoplatform.services.jcr.impl.util.io.SwapFile.spoolDone()


   public void testIsSpooled() throws IOException
   {
      SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
      assertFalse("Spool is not over.", sf.isSpooled());
      sf.spoolDone();
      assertTrue("Spool is over.", sf.isSpooled());
      sf.delete();
   }

   public void testSpoolDone() throws IOException
View Full Code Here


   }

   public void testSpoolDone() throws IOException
   {
      SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
      sf.spoolDone();
      assertTrue("Spool should be done.", sf.isSpooled());
      sf.delete();
   }

   public void testDeleteAbstractSwapFile() throws IOException
View Full Code Here

                        + ". Property " + data.getQPath().getAsString());
                  }
               }
               finally
               {
                  swapFile.spoolDone();
               }

               stream = streamData.getAsStream();
            }
            storageId = null;
View Full Code Here

                        + ". Property " + data.getQPath().getAsString());
                  }
               }
               finally
               {
                  swapFile.spoolDone();
               }

               stream = streamData.getAsStream();
            }
            storageId = null;
View Full Code Here

      finally
      {
         if (out != null)
         {
            out.close();
            swapFile.spoolDone();
         }
      }

      if (buffer == null)
      {
View Full Code Here

               {
                  WRITE_VALUE_HELPER.writeStreamedValue(swapFile, streamData);
               }
               finally
               {
                  swapFile.spoolDone();
               }

               long vlen = PrivilegedFileHelper.length(swapFile);
               if (vlen <= Integer.MAX_VALUE)
               {
View Full Code Here

                        + ". Property " + data.getQPath().getAsString());
                  }
               }
               finally
               {
                  swapFile.spoolDone();
               }

               stream = streamData.getAsStream();
            }
            storageId = null;
View Full Code Here

         is.close();
      }
      OutputStream out = new FileOutputStream(sf);
      out.write(value);
      out.close();
      sf.spoolDone();
      startSignal.await();
      if (step.compareAndSet(0, 1))
      {
         sf = SwapFile.get(new File(TestSwapFile.DIR_NAME), TestSwapFile.FILE_NAME + "-testConcurrentAccess");
         InputStream is = new FileInputStream(sf);
View Full Code Here

   public void testGetSwapFile() throws IOException
   {
      // Get swap file is possible only in this way.
      SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
      assertNotNull("File should be created.", sf);
      sf.spoolDone();
      sf.delete();
   }

   public void testIsSpooled() throws IOException
   {
View Full Code Here

   public void testIsSpooled() throws IOException
   {
      SwapFile sf = SwapFile.get(new File(DIR_NAME), FILE_NAME);
      assertFalse("Spool is not over.", sf.isSpooled());
      sf.spoolDone();
      assertTrue("Spool is over.", sf.isSpooled());
      sf.delete();
   }

   public void testSpoolDone() throws IOException
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.