Examples of CachedValue


Examples of org.activemq.message.CachedValue

   * @throws IOException
   *             thrown if an error occurs
   */

  public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
        CachedValue cv = (CachedValue)packet;
    super.writePacket(cv, dataOut);
        super.writeObject(cv.getValue(), dataOut);
  }
View Full Code Here

Examples of org.activemq.message.CachedValue

   
    private synchronized void updateCachedValue(short key, Object value) throws IOException {
        if (cachedValueWriter == null) {
            cachedValueWriter = new CachedValueWriter();
        }
        CachedValue cv = new CachedValue();
        cv.setId(key);
        cv.setValue(value);
        cachedBytesOut.reset();
        cachedValueWriter.writePacket(cv, cachedDataOut);
        cachedDataOut.flush();
        byte[] data = cachedBytesOut.getData();
        int count = cachedBytesOut.size();
        getTransportDataOut().writeByte(cv.getPacketType());
        getTransportDataOut().writeInt(count);
        getTransportDataOut().write(data, 0, count);
    }
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

            case Packet.KEEP_ALIVE :
              return readPacket(dataIn, keepAliveReader);
            case Packet.BROKER_ADMIN_COMMAND :
              return readPacket(dataIn, brokerAdminCommandReader);
            case Packet.CACHED_VALUE_COMMAND :
                CachedValue cv =  (CachedValue)readPacket(dataIn,cachedValueReader);
                handleCachedValue(cv);
                return null;
            case Packet.CLEANUP_CONNECTION_INFO :
                return readPacket(dataIn, cleanupConnectionAndSessionInfoReader);
            default :
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

   
    private synchronized void updateCachedValue(short key,Object value) throws IOException{
        if (cachedValueWriter == null){
            cachedValueWriter = new CachedValueWriter();
        }
        CachedValue cv = new CachedValue();
        cv.setId(key);
        cv.setValue(value);
        cachedBytesOut.reset();
        cachedValueWriter.writePacket(cv,cachedDataOut);
        cachedDataOut.flush();
        byte[] data = cachedBytesOut.getData();
        int count = cachedBytesOut.size();
        getTransportDataOut().writeByte(cv.getPacketType());
        getTransportDataOut().writeInt(count);
        getTransportDataOut().write(data,0,count);
       
       
    }
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

    /**
     * @return a new Packet instance
     */

    public Packet createPacket() {
        return new CachedValue();
    }
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

     * @param dataIn the data input stream to build the packet from
     * @throws IOException
     */

    public void buildPacket(Packet packet, DataInput dataIn) throws IOException {
        CachedValue cv = (CachedValue)packet;
        super.buildPacket(cv, dataIn);
        cv.setValue(super.readObject(dataIn));
       
    }
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

   * @throws IOException
   *             thrown if an error occurs
   */

  public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
        CachedValue cv = (CachedValue)packet;
    super.writePacket(cv, dataOut);
        super.writeObject(cv.getValue(), dataOut);
  }
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

            case Packet.KEEP_ALIVE :
              return readPacket(dataIn, keepAliveReader);
            case Packet.BROKER_ADMIN_COMMAND :
              return readPacket(dataIn, brokerAdminCommandReader);
            case Packet.CACHED_VALUE_COMMAND :
                CachedValue cv =  (CachedValue)readPacket(dataIn,cachedValueReader);
                handleCachedValue(cv);
                return null;
            case Packet.CLEANUP_CONNECTION_INFO :
                return readPacket(dataIn, cleanupConnectionAndSessionInfoReader);
            default :
View Full Code Here

Examples of org.codehaus.activemq.message.CachedValue

   
    private synchronized void updateCachedValue(short key,Object value) throws IOException{
        if (cachedValueWriter == null){
            cachedValueWriter = new CachedValueWriter();
        }
        CachedValue cv = new CachedValue();
        cv.setId(key);
        cv.setValue(value);
        cachedBytesOut.reset();
        cachedValueWriter.writePacket(cv,cachedDataOut);
        cachedDataOut.flush();
        byte[] data = cachedBytesOut.getData();
        int count = cachedBytesOut.size();
        getTransportDataOut().writeByte(cv.getPacketType());
        getTransportDataOut().writeInt(count);
        getTransportDataOut().write(data,0,count);
       
       
    }
View Full Code Here

Examples of org.jboss.msc.value.CachedValue

        private InterceptorFactory createInterceptorFactoryForContainerInterceptor(final Method method, final Constructor interceptorConstructor) {
            // The managed reference is going to be ConstructedValue, using the container-interceptor's constructor
            final ConstructedValue interceptorInstanceValue = new ConstructedValue(interceptorConstructor, Collections.<Value<?>>emptyList());
            // we *don't* create multiple instances of the container-interceptor class, but we just reuse a single instance and it's *not*
            // tied to the EJB component instance lifecycle.
            final CachedValue cachedInterceptorInstanceValue = new CachedValue(interceptorInstanceValue);
            // ultimately create the managed reference which is backed by the CachedValue
            final ManagedReference interceptorInstanceRef = new ValueManagedReference(cachedInterceptorInstanceValue);
            // return the ContainerInterceptorMethodInterceptorFactory which is responsible for creating a Interceptor
            // which can invoke the container-interceptor's around-invoke/around-timeout methods
            return new ContainerInterceptorMethodInterceptorFactory(interceptorInstanceRef, method);
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.