public long getMinimumBinarySizeInBytes() { return binaryStorage.getLong(FieldName.MINIMUM_BINARY_SIZE_IN_BYTES, Default.MINIMUM_BINARY_SIZE_IN_BYTES); }
public long getLockTimeoutMillis() { return doc.getLong(FieldName.LOCK_TIMEOUT_MILLIS, Default.LOCK_TIMEOUT); }
public long getMinimumBinarySizeInBytes() { return binaryStorage.getLong(FieldName.MINIMUM_BINARY_SIZE_IN_BYTES, Default.MINIMUM_BINARY_SIZE_IN_BYTES); }
public long getLockTimeoutMillis() { return doc.getLong(FieldName.LOCK_TIMEOUT_MILLIS, Default.LOCK_TIMEOUT); }
public long getMinimumStringSize() { return binaryStorage.getLong(FieldName.MINIMUM_STRING_SIZE, getMinimumBinarySizeInBytes()); }
public long getMinimumStringSize() { return binaryStorage.getLong(FieldName.MINIMUM_STRING_SIZE, getMinimumBinarySizeInBytes()); }
public ChildReferencesInfo getChildReferencesInfo( Document document ) { // Now look at the 'childrenInfo' document for info about the next block ... Document childrenInfo = document.getDocument(CHILDREN_INFO); if (childrenInfo != null) { long totalSize = childrenInfo.getLong(COUNT, 0L); long blockSize = childrenInfo.getLong(BLOCK_SIZE, 0L); String nextBlockKey = childrenInfo.getString(NEXT_BLOCK); String lastBlockKey = childrenInfo.getString(LAST_BLOCK, nextBlockKey); return new ChildReferencesInfo(totalSize, blockSize, nextBlockKey, lastBlockKey); } return null; }
public ChildReferencesInfo getChildReferencesInfo( Document document ) { // Now look at the 'childrenInfo' document for info about the next block ... Document childrenInfo = document.getDocument(CHILDREN_INFO); if (childrenInfo != null) { long totalSize = childrenInfo.getLong(COUNT, 0L); long blockSize = childrenInfo.getLong(BLOCK_SIZE, 0L); String nextBlockKey = childrenInfo.getString(NEXT_BLOCK); String lastBlockKey = childrenInfo.getString(LAST_BLOCK, nextBlockKey); return new ChildReferencesInfo(totalSize, blockSize, nextBlockKey, lastBlockKey); } return null; }
protected BucketedChildReferences( Document parent, DocumentTranslator translator ) { // the power of 16 which indicates how many buckets this.bucketIdLength = parent.getInteger(DocumentConstants.BUCKET_ID_LENGTH); Long size = parent.getLong(DocumentConstants.SIZE); this.size = size != null ? size : 0; this.parentKey = translator.getKey(parent); this.translator = translator; List<?> bucketsArray = parent.getArray(DocumentConstants.BUCKETS); if (bucketsArray == null) { this.bucketIds = Collections.emptySet(); } else { this.bucketIds = new HashSet<>(bucketsArray.size()); for (Object bucketId : bucketsArray) { this.bucketIds.add(new BucketId(bucketId.toString())); } } this.rangeBucketsById = new LinkedHashMap<>(bucketIds.size()); }
protected BucketedChildReferences( Document parent, DocumentTranslator translator ) { // the power of 16 which indicates how many buckets this.bucketIdLength = parent.getInteger(DocumentConstants.BUCKET_ID_LENGTH); Long size = parent.getLong(DocumentConstants.SIZE); this.size = size != null ? size : 0; this.parentKey = translator.getKey(parent); this.translator = translator; List<?> bucketsArray = parent.getArray(DocumentConstants.BUCKETS); if (bucketsArray == null) { this.bucketIds = Collections.emptySet(); } else { this.bucketIds = new HashSet<>(bucketsArray.size()); for (Object bucketId : bucketsArray) { this.bucketIds.add(new BucketId(bucketId.toString())); } } this.rangeBucketsById = new LinkedHashMap<>(bucketIds.size()); }
return document.getBoolean(jcrName); case DECIMAL: return BigDecimal.valueOf(document.getLong(jcrName)); case INTEGER: return document.getInteger(jcrName);
protected void assertInfo( String key, long expectedChildCount, String expectedNextBlock, String expectedLastBlock, boolean firstBlock, long expectedBlockSize ) { Document doc = workspaceCache.documentStore().get(key).content(); Document info = doc.getDocument(DocumentTranslator.CHILDREN_INFO); assertThat(info.getLong(DocumentTranslator.COUNT), is(expectedChildCount)); assertThat(info.getString(DocumentTranslator.NEXT_BLOCK), is(expectedNextBlock)); assertThat(info.getString(DocumentTranslator.LAST_BLOCK), is(expectedLastBlock)); if (firstBlock) { assertThat(info.containsField(DocumentTranslator.BLOCK_SIZE), is(expectedNextBlock != null)); } else { assertThat(info.getLong(DocumentTranslator.BLOCK_SIZE), is(expectedBlockSize)); } } }
long size = doc.getLong(LENGTH_FIELD); try { return binaries.find(new BinaryKey(valueStr), size);
long size = doc.getLong(LENGTH_FIELD); try { return binaries.find(new BinaryKey(valueStr), size);