Skip to content

Commit e4f241b

Browse files
committed
add getters for the builder
this is necessary when extending it or passing the builder on in different contexts.
1 parent 7ef1d29 commit e4f241b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/RetryingCallableBuilder.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,38 @@ public function setRetryDelay($retryDelay)
8484
return $this;
8585
}
8686

87+
/**
88+
* Returns the exceptions to catch and retry on.
89+
*
90+
* If empty, every exception will trigger the retry logic.
91+
*
92+
* @return string[] Array of exception classes/interfaces
93+
*/
94+
public function getRetryableExceptions()
95+
{
96+
return $this->exceptions;
97+
}
98+
99+
/**
100+
* Returns the maximum number of retries.
101+
*
102+
* @return int Maximum number of retries
103+
*/
104+
public function getMaxRetries()
105+
{
106+
return $this->maxRetries;
107+
}
108+
109+
/**
110+
* Returns the delay between retries in milliseconds.
111+
*
112+
* @return int Delay in milliseconds
113+
*/
114+
public function getRetryDelay()
115+
{
116+
return $this->retryDelay;
117+
}
118+
87119
/**
88120
* Returns a callable that decorates the given operation to add the retry logic.
89121
*

0 commit comments

Comments
 (0)