本文整理汇总了C#中IUnmanagedTarget类的典型用法代码示例。如果您正苦于以下问题:C# IUnmanagedTarget类的具体用法?C# IUnmanagedTarget怎么用?C# IUnmanagedTarget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IUnmanagedTarget类属于命名空间,在下文中一共展示了IUnmanagedTarget类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CacheLock
/// <summary>
/// Initializes a new instance of the <see cref="CacheLock"/> class.
/// </summary>
/// <param name="id">Lock id.</param>
/// <param name="cache">Cache.</param>
public CacheLock(long id, IUnmanagedTarget cache)
{
Debug.Assert(cache != null);
_id = id;
_cache = cache;
}
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:12,代码来源:CacheLock.cs
示例2: AtomicSequence
/// <summary>
/// Initializes a new instance of the <see cref="Apache.Ignite.Core.Impl.DataStructures.AtomicLong"/> class.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="marsh">The marshaller.</param>
/// <param name="name">The name.</param>
public AtomicSequence(IUnmanagedTarget target, Marshaller marsh, string name)
: base(target, marsh)
{
Debug.Assert(!string.IsNullOrEmpty(name));
_name = name;
}
开发者ID:RazmikMkrtchyan,项目名称:ignite,代码行数:13,代码来源:AtomicSequence.cs
示例3: SetProcessor
/// <summary>
/// Sets the processor.
/// </summary>
/// <param name="proc">The proc.</param>
public void SetProcessor(IUnmanagedTarget proc)
{
Debug.Assert(proc != null);
lock (_syncRoot)
{
_proc = proc;
// Preload enabled levels.
_enabledLevels.AddRange(
new[] { LogLevel.Trace, LogLevel.Debug, LogLevel.Info, LogLevel.Warn, LogLevel.Error }
.Where(x => UnmanagedUtils.ProcessorLoggerIsLevelEnabled(proc, (int)x)));
foreach (var log in _pendingLogs)
{
Log(log.Item1, log.Item2, log.Item3, log.Item4);
}
}
}
开发者ID:kjniemi,项目名称:ignite,代码行数:23,代码来源:JavaLogger.cs
示例4: TransactionsImpl
/// <summary>
/// Initializes a new instance of the <see cref="TransactionsImpl" /> class.
/// </summary>
/// <param name="target">Target.</param>
/// <param name="marsh">Marshaller.</param>
/// <param name="localNodeId">Local node id.</param>
public TransactionsImpl(IUnmanagedTarget target, Marshaller marsh,
Guid localNodeId) : base(target, marsh)
{
_localNodeId = localNodeId;
TransactionConcurrency concurrency = default(TransactionConcurrency);
TransactionIsolation isolation = default(TransactionIsolation);
TimeSpan timeout = default(TimeSpan);
DoInOp(OpCacheConfigParameters, stream =>
{
var reader = marsh.StartUnmarshal(stream).GetRawReader();
concurrency = (TransactionConcurrency) reader.ReadInt();
isolation = (TransactionIsolation) reader.ReadInt();
timeout = TimeSpan.FromMilliseconds(reader.ReadLong());
});
_dfltConcurrency = concurrency;
_dfltIsolation = isolation;
_dfltTimeout = timeout;
}
开发者ID:dheep-purdessy,项目名称:ignite,代码行数:28,代码来源:TransactionsImpl.cs
示例5: Invoke
/// <summary>
/// Invokes a store operation.
/// </summary>
/// <param name="input">Input stream.</param>
/// <param name="cb">Callback.</param>
/// <param name="grid">Grid.</param>
/// <returns>Invocation result.</returns>
/// <exception cref="IgniteException">Invalid operation type: + opType</exception>
public int Invoke(IBinaryStream input, IUnmanagedTarget cb, Ignite grid)
{
IBinaryReader reader = grid.Marshaller.StartUnmarshal(input,
_convertBinary ? BinaryMode.Deserialize : BinaryMode.ForceBinary);
IBinaryRawReader rawReader = reader.GetRawReader();
int opType = rawReader.ReadByte();
// Setup cache sessoin for this invocation.
long sesId = rawReader.ReadLong();
CacheStoreSession ses = grid.HandleRegistry.Get<CacheStoreSession>(sesId, true);
ses.CacheName = rawReader.ReadString();
_sesProxy.SetSession(ses);
try
{
// Perform operation.
switch (opType)
{
case OpLoadCache:
_store.LoadCache((k, v) => WriteObjects(cb, grid, k, v), rawReader.ReadArray<object>());
break;
case OpLoad:
object val = _store.Load(rawReader.ReadObject<object>());
if (val != null)
WriteObjects(cb, grid, val);
break;
case OpLoadAll:
var keys = rawReader.ReadCollection();
var result = _store.LoadAll(keys);
foreach (DictionaryEntry entry in result)
WriteObjects(cb, grid, entry.Key, entry.Value);
break;
case OpPut:
_store.Write(rawReader.ReadObject<object>(), rawReader.ReadObject<object>());
break;
case OpPutAll:
_store.WriteAll(rawReader.ReadDictionary());
break;
case OpRmv:
_store.Delete(rawReader.ReadObject<object>());
break;
case OpRmvAll:
_store.DeleteAll(rawReader.ReadCollection());
break;
case OpSesEnd:
grid.HandleRegistry.Release(sesId);
_store.SessionEnd(rawReader.ReadBoolean());
break;
default:
throw new IgniteException("Invalid operation type: " + opType);
}
return 0;
}
finally
{
_sesProxy.ClearSession();
}
}
开发者ID:dheep-purdessy,项目名称:ignite,代码行数:92,代码来源:CacheStore.cs
示例6: AtomicLongClose
internal static void AtomicLongClose(IUnmanagedTarget target)
{
JNI.AtomicLongClose(target.Context, target.Target);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例7: AtomicLongCompareAndSetAndGet
internal static long AtomicLongCompareAndSetAndGet(IUnmanagedTarget target, long expVal, long newVal)
{
return JNI.AtomicLongCompareAndSetAndGet(target.Context, target.Target, expVal, newVal);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例8: AtomicLongDecrementAndGet
internal static long AtomicLongDecrementAndGet(IUnmanagedTarget target)
{
return JNI.AtomicLongDecrementAndGet(target.Context, target.Target);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例9: ServicesCancelAll
internal static void ServicesCancelAll(IUnmanagedTarget target)
{
JNI.ServicesCancelAll(target.Context, target.Target);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例10: TransactionsState
internal static int TransactionsState(IUnmanagedTarget target, long id)
{
return JNI.TxState(target.Context, target.Target, id);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例11: TransactionsRollbackAsync
internal static void TransactionsRollbackAsync(IUnmanagedTarget target, long id, long futId)
{
JNI.TxRollbackAsync(target.Context, target.Target, id, futId);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例12: TransactionsRollback
internal static int TransactionsRollback(IUnmanagedTarget target, long id)
{
return JNI.TxRollback(target.Context, target.Target, id);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例13: TransactionsStart
internal static long TransactionsStart(IUnmanagedTarget target, int concurrency, int isolation, long timeout, int txSize)
{
return JNI.TxStart(target.Context, target.Target, concurrency, isolation, timeout, txSize);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例14: QueryCursorClose
internal static void QueryCursorClose(IUnmanagedTarget target)
{
JNI.QryCursorClose(target.Context, target.Target);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例15: QueryCursorIterator
internal static void QueryCursorIterator(IUnmanagedTarget target)
{
JNI.QryCursorIterator(target.Context, target.Target);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例16: ServicesWithServerKeepBinary
internal static IUnmanagedTarget ServicesWithServerKeepBinary(IUnmanagedTarget target)
{
return target.ChangeTarget(JNI.ServicesWithServerKeepBinary(target.Context, target.Target));
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例17: ServicesCancel
internal static void ServicesCancel(IUnmanagedTarget target, string name)
{
var nameChars = (char*)IgniteUtils.StringToUtf8Unmanaged(name);
try
{
JNI.ServicesCancel(target.Context, target.Target, nameChars);
}
finally
{
Marshal.FreeHGlobal(new IntPtr(nameChars));
}
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:13,代码来源:UnmanagedUtils.cs
示例18: TransactionsSetRollbackOnly
internal static bool TransactionsSetRollbackOnly(IUnmanagedTarget target, long id)
{
return JNI.TxSetRollbackOnly(target.Context, target.Target, id);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
示例19: ServicesGetServiceProxy
internal static IUnmanagedTarget ServicesGetServiceProxy(IUnmanagedTarget target, string name, bool sticky)
{
var nameChars = (char*)IgniteUtils.StringToUtf8Unmanaged(name);
try
{
return target.ChangeTarget(JNI.ServicesGetServiceProxy(target.Context, target.Target, nameChars, sticky));
}
finally
{
Marshal.FreeHGlobal(new IntPtr(nameChars));
}
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:13,代码来源:UnmanagedUtils.cs
示例20: TransactionsResetMetrics
internal static void TransactionsResetMetrics(IUnmanagedTarget target)
{
JNI.TxResetMetrics(target.Context, target.Target);
}
开发者ID:iveselovskiy,项目名称:ignite,代码行数:4,代码来源:UnmanagedUtils.cs
注:本文中的IUnmanagedTarget类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论