Examples of Serializable


Examples of java.io.Serializable

        HashMap keyHashTemp = new HashMap();
        CacheFileAdapter dataFileTemp =
            new CacheFileAdapter(new File(rafDir, fileName + "Temp.data"));
        Iterator itr = keyHash.keySet().iterator();
        while (itr.hasNext()) {
            Serializable key = (Serializable) itr.next();
            CacheObject tempDe = readElement(key);
            DiskElementDescriptor de = dataFileTemp.appendObject(tempDe);
            keyHashTemp.put(key, de);
        }
        dataFileTemp.close();
View Full Code Here

Examples of java.io.Serializable

     */
    CacheObject readElement(final Serializable key)
        throws DiskCacheException {
        DiskElementDescriptor ded = (DiskElementDescriptor) keyHash.get(key);
        if (ded != null) {
            Serializable readObject = dataFile.readObject(ded.pos);
      return ((DiskCacheObject) readObject).getCacheObject();
        }
        throw new DiskCacheException("The object " + key
            + " was not found in the diskCache.");
    }
View Full Code Here

Examples of java.io.Serializable

   XBObjectMessage(XBSession session, byte[] content) {
      super(session, content, XBMessage.OBJECT);
   }
  
   public Serializable getObject() throws JMSException {
      Serializable ret;
      try {
         ByteArrayInputStream bais = new ByteArrayInputStream(this.content);
         ObjectInputStream ois = new ObjectInputStream(bais);
         ret = (Serializable)ois.readObject();
         ois.close();
View Full Code Here

Examples of java.io.Serializable

         assertEquals(id, theId);
      }
     
      public void testSerialized() throws Exception
      {
         Serializable obj = new SerializableObject("uyuiyiu", 234234);
        
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
        
         OutputStream oos = new DataOutputStream(bos);
View Full Code Here

Examples of java.io.Serializable

     
      replicatedData = new HashMap(size);
     
      for (int i = 0; i < size; i++)
      {
         Serializable key = (Serializable)StreamUtils.readObject(in, true);
        
         HashMap replicants = StreamUtils.readMap(in, false);
        
         replicatedData.put(key, replicants);
      }
View Full Code Here

Examples of java.io.Serializable

     
      while (iter.hasNext())
      {
         Map.Entry entry = (Map.Entry)iter.next();
        
         Serializable key = (Serializable)entry.getKey();        
        
         StreamUtils.writeObject(out, key, true, true);
        
         Map replicants = (Map)entry.getValue();
        
View Full Code Here

Examples of java.io.Serializable

      while (iter.hasNext())
      {
         Map.Entry entry = (Map.Entry)iter.next();

         Serializable key = (Serializable)entry.getKey();

         Map replicants = (Map)entry.getValue();

         Map m = new LinkedHashMap();
View Full Code Here

Examples of java.io.Serializable

     *
     * @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
     */
    public void write( Object obj, OutputStream out ) throws Exception
    {
        Serializable target = (Serializable)obj;
        ObjectOutputStream oout = new ObjectOutputStream( out );
        oout.writeObject( target );
        oout.close();
    }
View Full Code Here

Examples of java.io.Serializable

     * @param timer timer with information.
     */
    @Timeout
    public void timeout(final Timer timer) {
        String op = "";
        Serializable info = timer.getInfo();

        if (info != null){
            op = info.toString();
        }

        if (isEqual(RESOURCE_MANAGER, op)) {
            DataSource ds = (DataSource) ctx.lookup("jdbc/ds01");
            checkResource(ds);
View Full Code Here

Examples of java.io.Serializable

   * @see org.apache.commons.collections.Predicate#evaluate(java.lang.Object)
   */
  public boolean evaluate(final Object value) {
    if (null == value) { return false; }
    try {
      Serializable key = (Serializable) PropertyUtils.getProperty(value, "id");
      return ValidEntityKeyPredicate.getInstance().evaluate(key);
    } catch (Exception e) {
      return false;
    }
  }
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.