@Override public FileStore createFileStore(String name) { return storageManager.createFileStore(name); }
@Override public FileStore createFileStore(String name) { return storageManager.createFileStore(name); }
@Override public FileStore createFileStore(String name) { return storageManager.createFileStore(name); }
public BlockStore(StorageManager storageManager, int blockSize, int blockCountLog, int concurrencyLevel) { this.blockSize = blockSize; int blockCount = 1 << blockCountLog; this.blocksInUse = new ConcurrentBitSet(blockCount, concurrencyLevel); this.blocksInUse.setCompact(true); this.stores = new FileStore[concurrencyLevel]; this.locks = new ReentrantReadWriteLock[concurrencyLevel]; for (int i = 0; i < stores.length; i++) { this.stores[i] = storageManager.createFileStore(String.valueOf(blockSize) + '_' + i); this.locks[i] = new ReentrantReadWriteLock(); } }
public BlockStore(StorageManager storageManager, int blockSize, int blockCountLog, int concurrencyLevel) { this.blockSize = blockSize; int blockCount = 1 << blockCountLog; this.blocksInUse = new ConcurrentBitSet(blockCount, concurrencyLevel); this.blocksInUse.setCompact(true); this.stores = new FileStore[concurrencyLevel]; this.locks = new ReentrantReadWriteLock[concurrencyLevel]; for (int i = 0; i < stores.length; i++) { this.stores[i] = storageManager.createFileStore(String.valueOf(blockSize) + '_' + i); this.locks[i] = new ReentrantReadWriteLock(); } }
public BlockStore(StorageManager storageManager, int blockSize, int blockCountLog, int concurrencyLevel) { this.blockSize = blockSize; int blockCount = 1 << blockCountLog; this.blocksInUse = new ConcurrentBitSet(blockCount, concurrencyLevel); this.blocksInUse.setCompact(true); this.stores = new FileStore[concurrencyLevel]; this.locks = new ReentrantReadWriteLock[concurrencyLevel]; for (int i = 0; i < stores.length; i++) { this.stores[i] = storageManager.createFileStore(String.valueOf(blockSize) + '_' + i); this.locks[i] = new ReentrantReadWriteLock(); } }
@Override public EncryptedFileStore createFileStore(String name) { final FileStore file = manager.createFileStore(name); try { return new EncryptedFileStore(file, key); } catch (GeneralSecurityException e) { throw new TeiidRuntimeException(e); } }
private void ensureLength(long length) throws IOException { if (length <= len) { return; } int numFiles = (int)(length/maxFileSize); long lastFileSize = length%maxFileSize; if (lastFileSize > 0) { numFiles++; } for (int i = storageFiles.size(); i < numFiles; i++) { FileStore newFileInfo = storageManager.createFileStore(name + "_" + storageFiles.size()); //$NON-NLS-1$ storageFiles.add(newFileInfo); if (lastFileSize == 0 || i != numFiles - 1) { newFileInfo.setLength(maxFileSize); } } if (lastFileSize > 0) { storageFiles.get(storageFiles.size() - 1).setLength(lastFileSize); } len = length; }
private void ensureLength(long length) throws IOException { if (length <= len) { return; } int numFiles = (int)(length/maxFileSize); long lastFileSize = length%maxFileSize; if (lastFileSize > 0) { numFiles++; } for (int i = storageFiles.size(); i < numFiles; i++) { FileStore newFileInfo = storageManager.createFileStore(name + "_" + storageFiles.size()); //$NON-NLS-1$ storageFiles.add(newFileInfo); if (lastFileSize == 0 || i != numFiles - 1) { newFileInfo.setLength(maxFileSize); } } if (lastFileSize > 0) { storageFiles.get(storageFiles.size() - 1).setLength(lastFileSize); } len = length; }
private void ensureLength(long length) throws IOException { if (length <= len) { return; } int numFiles = (int)(length/maxFileSize); long lastFileSize = length%maxFileSize; if (lastFileSize > 0) { numFiles++; } for (int i = storageFiles.size(); i < numFiles; i++) { FileStore newFileInfo = storageManager.createFileStore(name + "_" + storageFiles.size()); //$NON-NLS-1$ storageFiles.add(newFileInfo); if (lastFileSize == 0 || i != numFiles - 1) { newFileInfo.setLength(maxFileSize); } } if (lastFileSize > 0) { storageFiles.get(storageFiles.size() - 1).setLength(lastFileSize); } len = length; }
@Override public EncryptedFileStore createFileStore(String name) { final FileStore file = manager.createFileStore(name); try { return new EncryptedFileStore(file, key); } catch (GeneralSecurityException e) { throw new TeiidRuntimeException(e); } }
@Override public EncryptedFileStore createFileStore(String name) { final FileStore file = manager.createFileStore(name); try { return new EncryptedFileStore(file, key); } catch (GeneralSecurityException e) { throw new TeiidRuntimeException(e); } }
@Override public FileStore createFileStore(String name) { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) { LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$ } FileStore result = this.storageManager.createFileStore(name); result.setMaxLength(this.maxFileStoreLength); return result; }
store = storageManager.createFileStore("temp-stream"); //$NON-NLS-1$ StreamFactoryReference sfr = streams.get(streamIndex); sfr.setStreamFactory(new FileStoreInputStreamFactory(store, Streamable.ENCODING));
@Override public FileStore createFileStore(String name) { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) { LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$ } FileStore delegate = this.storageManager.createFileStore(name); ConstraintedFileStore wrapper = new ConstraintedFileStore(delegate, this); wrapper.setMaxLength(this.maxFileStoreLength); CommandContext cc = CommandContext.getThreadLocalContext(); if (cc != null) { wrapper.setSession(cc.getSession()); } return wrapper; }
@Override public FileStore createFileStore(String name) { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) { LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Creating FileStore:", name); //$NON-NLS-1$ } FileStore delegate = this.storageManager.createFileStore(name); ConstraintedFileStore wrapper = new ConstraintedFileStore(delegate, this); wrapper.setMaxLength(this.maxFileStoreLength); CommandContext cc = CommandContext.getThreadLocalContext(); if (cc != null) { wrapper.setSession(cc.getSession()); } return wrapper; }