Package org.infinispan.marshall

Examples of org.infinispan.marshall.Marshaller.finishObjectInput()


      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      ObjectInput oi = marshaller.startObjectInput(in, false);
      try {
         cacheStore.fromStream(new UnclosableObjectInputStream(oi));        
      } finally {
         marshaller.finishObjectInput(oi);
         in.close();
      }
      assertRowCounts(2, 2);
      assert cacheStore.load("String").getValue().equals("someValue");
      assert cacheStore.load("String2").getValue().equals("someValue");
View Full Code Here


      try {
         assert oi.readInt() == 1 : "we have 3 different buckets";
         assert oi.readObject().equals("k1".hashCode() + "");
         assert oi.readInt() > 0; //size on disk
      } finally {
         marshaller.finishObjectInput(oi);
      }
   }
  
   public void testLongKeyValuesToStream() throws Exception {
      String k1 = "SESSION_173";
View Full Code Here

      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      ObjectInput oi = marshaller.startObjectInput(in, false);
      try {
         cs.fromStream(new UnclosableObjectInputStream(oi));
      } finally {
         marshaller.finishObjectInput(oi);
      }
     
      Set<InternalCacheEntry> set = cs.loadAll();
      assert set.size() == 2;
      Set expected = new HashSet();
View Full Code Here

      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      ObjectInput oi = marshaller.startObjectInput(in, false);
      try {
         cs2.fromStream(new UnclosableObjectInputStream(oi));        
      } finally {
         marshaller.finishObjectInput(oi);
         in.close();
      }
     
      Set<InternalCacheEntry> set = cs2.loadAll();
      assertEquals(set.size(), 3);
View Full Code Here

         cs2.fromStream(new UnclosableObjectInputStream(oi));
         bytesRead = oi.read(dummy, 0, 8);
         assert bytesRead == 8;
         for (int i = 8; i > 0; i--) assert dummy[8 - i] == i : "Start byte stream corrupted!";                 
      } finally {
         marshaller.finishObjectInput(oi);
         in.close();
      }

      Set<InternalCacheEntry> set = cs2.loadAll();
      assertEquals(set.size(), 3);
View Full Code Here

      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      ObjectInput oi = marshaller.startObjectInput(in, false);
      try {
         cs.fromStream(new UnclosableObjectInputStream(oi));        
      } finally {
         marshaller.finishObjectInput(oi);
         in.close();
      }

      Set<InternalCacheEntry> set = cs.loadAll();
      assert set.size() == 3;
View Full Code Here

         cs.fromStream(new UnclosableObjectInputStream(oi));
         bytesRead = oi.read(dummy, 0, 8);
         assert bytesRead == 8;
         for (int i = 8; i > 0; i--) assert dummy[8 - i] == i : "Start byte stream corrupted!";                 
      } finally {
         marshaller.finishObjectInput(oi);
         in.close();
      }
     
      Set<InternalCacheEntry> set = cs.loadAll();
      assert set.size() == 3;
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.