Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.as.ejb3.cache.impl.backing;
 
 import java.util.UUID;
 
Functions as both a StatefulObjectFactory and PassivationManager for org.jboss.as.ejb3.cache.spi.SerializationGroups.

Author(s):
Carlo de Wolf
Brian Stansberry
Paul Ferraro
 
     private static final Logger log = Logger.getLogger(SerializationGroupContainer.class);
 
     private final PassivationManager<K, V> passivationManager;
 
     private boolean clustered;
 
     public SerializationGroupContainer(PassivationManager<K, V> passivationManager) {
         this. = passivationManager;
     }
 
     public boolean isClustered() {
         return ;
     }
 
     public void setClustered(boolean clustered) {
         this. = clustered;
     }
 
     @Override
     public int getCurrentMarshallingVersion() {
         return this..getCurrentMarshallingVersion();
     }
 
     @Override
     public MarshallingConfiguration getMarshallingConfiguration(int version) {
         MarshallingConfiguration result = new MarshallingConfiguration();
         result.setBufferSize(config.getBufferSize());
         result.setClassCount(config.getClassCount());
         result.setClassResolver(config.getClassResolver());
         result.setClassTable(config.getClassTable());
         result.setExceptionListener(config.getExceptionListener());
         result.setExternalizerCreator(config.getExternalizerCreator());
         result.setInstanceCount(config.getInstanceCount());
         result.setObjectResolver(config.getObjectResolver());
         result.setObjectTable(config.getObjectTable());
         result.setSerializabilityChecker(this.);
         result.setSerializedCreator(config.getSerializedCreator());
         result.setStreamHeader(config.getStreamHeader());
         result.setVersion(config.getVersion());
         return result;
     }
 
     public void addMemberPassivationManager(PassivationManager<K, V> passivationManager) {
         SerializabilityChecker checker = passivationManager.getMarshallingConfiguration(passivationManager.getCurrentMarshallingVersion()).getSerializabilityChecker();
         if (checker != null) {
             this..addSerializabilityChecker(checker);
         }
     }
    @Override
    public Cacheable<UUIDcreateInstance() {
        return null;
    }
    @Override
    public void destroyInstance(Cacheable<UUIDinstance) {
    }
    @Override
    public SerializationGroup<K, V, UUIDcreateEntry(Cacheable<UUIDitem) {
        SerializationGroupImpl<K, V> group = new SerializationGroupImpl<K, V>(this..createIdentifier());
        group.setClustered();
        group.setGroupCache();
        return group;
    }
    @Override
    public void destroyEntry(SerializationGroup<K, V, UUIDgroup) {
        // TODO: nothing?
    }
    @Override
    public void postActivate(SerializationGroup<K, V, UUIDgroup) {
        .tracef("postActivate(%s)"group);
        // Restore ref to the groupCache in case it was lost during serialization
        group.setGroupCache();
        group.postActivate();
    }
    @Override
    public void prePassivate(SerializationGroup<K, V, UUIDgroup) {
        .tracef("prePassivate(%s)"group);
        group.prePassivate();
    }
    @Override
    public void postReplicate(SerializationGroup<K, V, UUIDgroup) {
        .tracef("postReplicate(%s)"group);
        // Restore ref to the groupCache in case it was lost during serialization
        group.setGroupCache();
        group.postReplicate();
    }
    @Override
    public void preReplicate(SerializationGroup<K, V, UUIDgroup) {
        .tracef("preReplicate(%s)"group);
        group.preReplicate();
    }
        return ;
    }
    public void setGroupCache(PassivatingBackingCache<UUIDCacheable<UUID>, SerializationGroup<K, V, UUID>> groupCache) {
        this. = groupCache;
    }
New to GrepCode? Check out our FAQ X