Package gov.nasa.arc.mct.buffer.config

Examples of gov.nasa.arc.mct.buffer.config.MemoryBufferEnv


    public static DataBuffer getMemoryDataBuffer(Properties prop) {
        if (!memoryBufferInitializeToken.get()) {
            synchronized(DataBufferFactory.class) {
                if (memoryDataBuffer == null) {
                    memoryDataBuffer = new CODataBuffer(new MemoryBufferEnv(prop), memoryBufferHelper);
                }
            }
            memoryBufferInitializeToken.compareAndSet(false, true);
        }
        return memoryDataBuffer;
View Full Code Here


        public void setup() throws IOException {
            Properties prop = new Properties();
            prop.load(ClassLoader.getSystemResourceAsStream("properties/testFeed.properties"));
            prop.put("memory.buffer.partition", "1");
            prop.put("memory.buffer.time.millis", "-1");
            env = new MemoryBufferEnv(prop);
            dataBuffer = new DataBuffer(env, new MemoryDataBufferHelper());
            if (dataBuffer.isDataBufferClose()) {
                dataBuffer.reset();
            }
        }
View Full Code Here

    public void testExceptions() {
        Properties prop = new Properties();
        prop.put("memory.buffer.partition", "2");
        prop.put("memory.buffer.time.millis", "100");
        final CountDownLatch latch = new CountDownLatch(2);
        DataBufferEnv env = new MemoryBufferEnv(prop);
        DataBufferHelper partitionBufferFactory = new MemoryDataBufferHelper();
        DataBuffer mockBuffer = new DataBuffer(env, partitionBufferFactory) {
            int prepareCount;
            int moveCount;
View Full Code Here

public class MemoryDataBufferHelper implements DataBufferHelper {

    @Override
    public MetaDataBuffer newMetaDataBuffer(DataBufferEnv env) {
        if (env == null) {
            return new MetaDataBuffer(new MemoryBufferEnv(null));
        }
        return new MetaDataBuffer(env);
    }
View Full Code Here

        return new PartitionMemoryBuffer((MemoryBufferEnv)env);
    }
   
    @Override
    public DataBufferEnv newMetaDataBufferEnv(Properties prop) {
        return new MemoryBufferEnv(prop);
    }
View Full Code Here

    private final MemoryBufferEnv env;
    private volatile boolean active;

    public PartitionMemoryBuffer(int partitionNumber) {
        this(new MemoryBufferEnv(null, partitionNumber));
        this.active = true;
        READ_PERF_LOGGER.debug("Newing memory partition {}", partitionNumber);
    }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.buffer.config.MemoryBufferEnv

Copyright © 2018 www.massapicom. 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.