///
declare module "copyright" {
export class FoundationDeviceServerCopyright {
static toString(): string;
}
}
declare module "foundation/device/server/cache/CacheDeviceTypeEnum" {
export class CacheDeviceTypeEnum {
static Memcache: string;
static Redis: string;
}
}
declare module "foundation/device/server/cache/memcache/MemcacheOptions" {
import { CacheOptions } from 'cross/service/module/cache/CacheOptions';
export class MemcacheOptions extends CacheOptions {
passport: string;
password: string;
}
}
declare module "foundation/device/server/cache/memcache/MemcacheConnection" {
import { ResultObject } from 'cross/runtime/lang/ResultObject';
import { EnvironmentService } from 'cross/runtime/module/environment/EnvironmentService';
import { CacheConnection } from 'cross/service/module/cache/CacheConnection';
import { CacheResult } from 'cross/service/module/cache/CacheResult';
import { MemcacheOptions } from "foundation/device/server/cache/memcache/MemcacheOptions";
export class MemcacheConnection extends CacheConnection {
options: MemcacheOptions;
protected _client: any;
protected _environmentService: EnvironmentService;
constructor();
errorHandle: (error: any) => void;
connectHandle: (error: any) => void;
readyHandle: (error: any) => void;
setupAsync(): Promise;
getAsync(key: string, timeout?: number): Promise;
setAsync(key: string, value: any, timeout?: number): Promise;
free(): void;
}
}
declare module "foundation/device/server/cache/memcache/MemcacheConnectionPool" {
import { ObjectPool } from 'cross/runtime/lang/ObjectPool';
import { ResultObject } from 'cross/runtime/lang/ResultObject';
import { CacheConnectionPool } from 'cross/service/module/cache/CacheConnectionPool';
import { MemcacheConnection } from "foundation/device/server/cache/memcache/MemcacheConnection";
import { MemcacheOptions } from "foundation/device/server/cache/memcache/MemcacheOptions";
export class MemcacheConnectionPool extends CacheConnectionPool {
protected _options: MemcacheOptions;
protected _pool: ObjectPool;
constructor();
get pool(): ObjectPool;
allocAsync(): Promise>;
free(connection: MemcacheConnection): void;
loadConfig(jconfig: any): void;
}
}
declare module "foundation/device/server/cache/memcache/MemcacheCacheDevice" {
import { CacheDevice } from 'cross/core/device/cache/CacheDevice';
import { ICachePool } from 'cross/core/device/cache/ICachePool';
export class MemcacheCacheDevice extends CacheDevice {
createPool(): ICachePool;
}
}
declare module "foundation/device/server/cache/memcache/MemcacheCacheDeviceProvider" {
import { DeviceProvider } from 'cross/runtime/module/device/DeviceProvider';
import { MemcacheCacheDevice } from "foundation/device/server/cache/memcache/MemcacheCacheDevice";
export class MemcacheCacheDeviceProvider extends DeviceProvider {
create(parameters?: any): MemcacheCacheDevice;
}
}
declare module "foundation/device/server/IndexSpace" {
export class IndexSpace {
static namespaces(): string[];
}
}
declare module "foundation/device/server/lock/ServerGlobalLockDevice" {
import { ResultObject } from 'cross/runtime/lang/ResultObject';
import { GlobalLockDevice } from 'cross/system/device/lock/GlobalLockDevice';
import { GlobalLockOptions } from 'cross/system/device/lock/GlobalLockOptions';
export class ServerGlobalLockDevice extends GlobalLockDevice {
lockAsync(key: string, owner: any, callback: Function, options?: GlobalLockOptions): Promise;
}
}
declare module "foundation/device/server/lock/ServerGlobalLockDeviceProvider" {
import { DeviceProvider } from 'cross/runtime/module/device/DeviceProvider';
import { GlobalLockDevice } from 'cross/system/device/lock/GlobalLockDevice';
export class ServerGlobalLockDeviceProvider extends DeviceProvider {
create(parameters?: any): GlobalLockDevice;
}
}
declare module "foundation/device/server/netmessage/NodeNetMessageDevice" {
import { NetMessageDeviceOptions } from 'cross/core/device/netmessage/NetMessageDeviceOptions';
import { NetMessageServerDevice } from 'cross/core/device/netmessage/NetMessageServerDevice';
import { NodeByteStream } from 'cross/system/feature/stream/NodeByteStream';
export class NodeNetMessageDevice extends NetMessageServerDevice {
protected name: string;
protected ws: any;
protected connectId: number;
protected connections: Array<{
id: number;
ws: any;
}>;
protected connectProcess: any;
protected messageProcess: any;
protected closeProcess: any;
protected errorProcess: any;
protected _stream: NodeByteStream;
constructor();
initConfig(options: NetMessageDeviceOptions): void;
start(): void;
onConnection: (ws: any, req: any) => void;
private onMessage;
private onClose;
private onError;
private onDisconnected;
sendMessage(connectId: number, msg: any): void;
}
}
declare module "foundation/device/server/netmessage/NodeNetMessageProvider" {
import { DeviceProvider } from 'cross/runtime/module/device/DeviceProvider';
import { NodeNetMessageDevice } from "foundation/device/server/netmessage/NodeNetMessageDevice";
export class NodeNetMessageProvider extends DeviceProvider {
create(): NodeNetMessageDevice;
}
}