@NotNull private static DirectBitSet createModIterBitSet() { return ATSDirectBitSet.wrap(new DirectStore(null, DIRTY_WORD_COUNT * 8, true).bytes()); }
private T createRef() { T ref = DataValueClasses.newDirectReference(tClass); ((Byteable) ref).bytes(store.bytes(), 0L); return ref; }
public DirectBitSet create(long size) { return wrap(DirectStore.allocate((size + 7) >>> 3).bytes()); } }
private T createRef() { T ref = DataValueClasses.newDirectReference(tClass); ((Byteable) ref).bytes(store.bytes(), 0L); return ref; }
public DirectBitSet create(long size) { return wrap(DirectStore.allocate((size + 7) >>> 3).bytes()); } }
public DailyRollingChronicle(String filename, DailyRollingConfig config) throws IOException { this.config = config; this.file = new File(filename); file.mkdirs(); if (!file.isDirectory()) throw new IOException("Failed to create directory " + file); master = new MasterIndexFile(new File(file, "master")); bytes = new DirectStore(config.getBytesMarshallerFactory(), config.getMaxEntrySize(), false).bytes(); SimpleDateFormat dateFormat = new SimpleDateFormat(config.getFileFormat()); dateFormat.setTimeZone(config.getTimeZone()); String currentFilename = dateFormat.format(new Date()); int index = master.append(currentFilename); filesList = new CopyOnWriteArrayList<DRFiles>(); while (filesList.size() < index) filesList.add(null); DRFiles indexFiles = new DRFiles(file, currentFilename); filesList.add(indexFiles); // worker = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory(file.getName() + "-worker", true)); }
public static <T> T newDirectInstance(Class<T> interfaceClass) { T t = newDirectReference(interfaceClass); Byteable b = (Byteable) t; b.bytes(DirectStore.allocate(b.maxSize()).bytes(), 0); return t; }
public static <T> T newDirectInstance(Class<T> interfaceClass) { T t = newDirectReference(interfaceClass); Byteable b = (Byteable) t; b.bytes(DirectStore.allocate(b.maxSize()).bytes(), 0); return t; }
public HugeArrayImpl(Class<T> tClass, long length) { this.tClass = tClass; this.length = length; T ref = DataValueClasses.newDirectReference(tClass); size = ((Byteable) ref).maxSize(); store = DirectStore.allocate(length * size); ((Byteable) ref).bytes(store.bytes(), 0L); recycle(ref); }
public HugeArrayImpl(Class<T> tClass, long length) { this.tClass = tClass; this.length = length; T ref = DataValueClasses.newDirectReference(tClass); size = ((Byteable) ref).maxSize(); store = DirectStore.allocate(length * size); ((Byteable) ref).bytes(store.bytes(), 0L); recycle(ref); }