Skip to content

Commit 641a29f

Browse files
author
Gunnar Liljas
committed
Readded async methods as Obsolete
1 parent c7f2968 commit 641a29f

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

src/NHibernate/Action/BulkOperationCleanupAction.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using System.Threading;
5+
using System.Threading.Tasks;
46
using NHibernate.Engine;
57
using NHibernate.Metadata;
68
using NHibernate.Persister.Entity;
@@ -144,5 +146,19 @@ private void EvictEntityRegions()
144146
}
145147

146148
#endregion
149+
150+
[Obsolete]
151+
public virtual void Init()
152+
{
153+
EvictEntityRegions();
154+
EvictCollectionRegions();
155+
}
156+
157+
[Obsolete]
158+
public virtual async Task InitAsync(CancellationToken cancellationToken)
159+
{
160+
await EvictEntityRegionsAsync(cancellationToken);
161+
await EvictCollectionRegionsAsync(cancellationToken);
162+
}
147163
}
148164
}

src/NHibernate/Async/Action/BulkOperationCleanupAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
using System;
1212
using System.Collections.Generic;
1313
using System.Linq;
14+
using System.Threading;
15+
using System.Threading.Tasks;
1416
using NHibernate.Engine;
1517
using NHibernate.Metadata;
1618
using NHibernate.Persister.Entity;
1719
using IQueryable = NHibernate.Persister.Entity.IQueryable;
1820

1921
namespace NHibernate.Action
2022
{
21-
using System.Threading.Tasks;
22-
using System.Threading;
2323
public partial class BulkOperationCleanupAction : IExecutable
2424
{
2525

src/NHibernate/Async/Hql/Ast/ANTLR/Exec/AbstractStatementExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
using NHibernate.Transaction;
2525
using NHibernate.Util;
2626
using System.Data;
27+
using System.Threading;
28+
using System.Threading.Tasks;
2729

2830
namespace NHibernate.Hql.Ast.ANTLR.Exec
2931
{
30-
using System.Threading.Tasks;
31-
using System.Threading;
3232
public abstract partial class AbstractStatementExecutor : IStatementExecutor
3333
{
3434

src/NHibernate/Hql/Ast/ANTLR/Exec/AbstractStatementExecutor.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
using NHibernate.Transaction;
1515
using NHibernate.Util;
1616
using System.Data;
17+
using System.Threading;
18+
using System.Threading.Tasks;
1719

1820
namespace NHibernate.Hql.Ast.ANTLR.Exec
1921
{
@@ -57,6 +59,16 @@ protected virtual void CoordinateSharedCacheCleanup(ISessionImplementor session)
5759
}
5860
}
5961

62+
[Obsolete]
63+
protected virtual Task CoordinateSharedCacheCleanupAsync(ISessionImplementor session, CancellationToken cancellationToken)
64+
{
65+
cancellationToken.ThrowIfCancellationRequested();
66+
67+
CoordinateSharedCacheCleanup(session);
68+
69+
return Task.CompletedTask;
70+
}
71+
6072
protected SqlString GenerateIdInsertSelect(IQueryable persister, string tableAlias, IASTNode whereClause)
6173
{
6274
var select = new SqlSelectBuilder(Factory);

0 commit comments

Comments
 (0)