Lines Matching refs:bra

503 func (bra BlockRequestAction) String() string {
504 if bra.DeepSync() {
507 if bra == BlockRequestSolo {
512 if bra.prefetch() {
514 } else if bra.PrefetchTracked() {
518 if bra.Sync() {
522 if bra.StopPrefetchIfFull() {
524 } else if bra.StopIfFull() {
528 if bra.DelayCacheCheck() {
531 if bra.NonMasterBranch() {
539 func (bra BlockRequestAction) Combine(
541 combined := bra | other
544 if bra.StopIfFull() != other.StopIfFull() {
550 func (bra BlockRequestAction) prefetch() bool {
551 return bra&blockRequestPrefetch > 0
556 func (bra BlockRequestAction) Prefetch(block data.Block) bool {
560 if block.IsIndirect() && bra.Sync() {
563 return bra.prefetch()
568 func (bra BlockRequestAction) PrefetchTracked() bool {
569 return bra.prefetch() || bra&blockRequestTrackedInPrefetch > 0
574 func (bra BlockRequestAction) Sync() bool {
575 return bra&blockRequestSync > 0 && bra&blockRequestNonMasterBranch == 0
580 func (bra BlockRequestAction) DeepSync() bool {
584 return bra.WithoutDelayedCacheCheckAction() == BlockRequestWithDeepSync
590 func (bra BlockRequestAction) DeepPrefetch() bool {
591 return bra.DeepSync() || bra == BlockRequestPrefetchUntilFull
596 func (bra BlockRequestAction) ChildAction(block data.Block) BlockRequestAction {
600 if bra.DeepPrefetch() || (block.IsIndirect() && bra.Sync()) {
601 return bra
605 if bra&blockRequestStopPrefetchIfFull > 0 {
606 bra &^= blockRequestStopPrefetchIfFull
607 bra |= blockRequestStopIfFull
609 return bra &^ (blockRequestPrefetch | blockRequestSync)
614 func (bra BlockRequestAction) SoloAction() BlockRequestAction {
615 return bra & blockRequestSync
621 func (bra BlockRequestAction) AddSync() BlockRequestAction {
622 if bra.prefetch() {
629 return bra | blockRequestSync
636 func (bra BlockRequestAction) AddPrefetch() BlockRequestAction {
637 if bra.Sync() {
641 return bra | blockRequestPrefetch | blockRequestTrackedInPrefetch
646 func (bra BlockRequestAction) AddNonMasterBranch() BlockRequestAction {
647 return bra | blockRequestNonMasterBranch
652 func (bra BlockRequestAction) NonMasterBranch() bool {
653 return bra&blockRequestNonMasterBranch > 0
658 func (bra BlockRequestAction) CacheType() DiskBlockCacheType {
659 if bra.Sync() {
667 func (bra BlockRequestAction) StopIfFull() bool {
668 return bra&blockRequestStopIfFull > 0
675 func (bra BlockRequestAction) StopPrefetchIfFull() bool {
676 return bra&blockRequestStopPrefetchIfFull > 0
681 func (bra BlockRequestAction) AddStopIfFull() BlockRequestAction {
682 return bra | blockRequestStopIfFull
687 func (bra BlockRequestAction) AddStopPrefetchIfFull() BlockRequestAction {
688 return bra | blockRequestStopPrefetchIfFull
693 func (bra BlockRequestAction) DelayedCacheCheckAction() BlockRequestAction {
694 return bra | blockRequestDelayCacheCheck
699 func (bra BlockRequestAction) WithoutDelayedCacheCheckAction() BlockRequestAction {
700 return bra &^ blockRequestDelayCacheCheck
707 func (bra BlockRequestAction) DelayCacheCheck() bool {
708 return bra&blockRequestDelayCacheCheck > 0